Browse Source

feat: tag should not be unique in cycle

trgiangdo 9 months ago
parent
commit
7f6a48a990
2 changed files with 1 additions and 6 deletions
  1. 0 4
      taipy/core/scenario/_scenario_manager.py
  2. 1 2
      taipy/core/taipy.py

+ 0 - 4
taipy/core/scenario/_scenario_manager.py

@@ -376,10 +376,6 @@ class _ScenarioManager(_Manager[Scenario], _VersionMixin):
         tags = scenario.properties.get(cls._AUTHORIZED_TAGS_KEY, set())
         if len(tags) > 0 and tag not in tags:
             raise UnauthorizedTagError(f"Tag `{tag}` not authorized by scenario configuration `{scenario.config_id}`")
-        if scenario.cycle:
-            if old_tagged_scenario := cls._get_by_tag(scenario.cycle, tag):
-                old_tagged_scenario.remove_tag(tag)
-                cls._set(old_tagged_scenario)
         scenario._add_tag(tag)
         cls._set(scenario)
         Notifier.publish(

+ 1 - 2
taipy/core/taipy.py

@@ -640,8 +640,7 @@ def set_primary(scenario: Scenario):
 def tag(scenario: Scenario, tag: str):
     """Add a tag to a scenario.
 
-    This function adds a user-defined tag to the specified scenario. If another scenario
-    within the same cycle already has the same tag applied, the previous scenario is untagged.
+    This function adds a user-defined tag to the specified scenario.
 
     Parameters:
         scenario (Scenario^): The scenario to which the tag will be added.