mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 15:08:51 +00:00
Fix bug where editing a schedule finish date by itself wouldn't work
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
import ifcopenshell
|
||||||
|
import ifcopenshell.util.date
|
||||||
|
|
||||||
|
|
||||||
class Data:
|
class Data:
|
||||||
is_loaded = False
|
is_loaded = False
|
||||||
resources = {}
|
resources = {}
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ class Usecase:
|
|||||||
|
|
||||||
# If the user specifies both an end date and a duration, the duration takes priority
|
# If the user specifies both an end date and a duration, the duration takes priority
|
||||||
if (
|
if (
|
||||||
"ScheduleWork" in self.settings["attributes"].keys()
|
self.settings["attributes"].get("ScheduleWork", None)
|
||||||
and "ScheduleFinish" in self.settings["attributes"].keys()
|
and "ScheduleFinish" in self.settings["attributes"].keys()
|
||||||
):
|
):
|
||||||
del self.settings["attributes"]["ScheduleFinish"]
|
del self.settings["attributes"]["ScheduleFinish"]
|
||||||
if (
|
if (
|
||||||
"ActualWork" in self.settings["attributes"].keys()
|
self.settings["attributes"].get("ActualWork", None)
|
||||||
and "ActualFinish" in self.settings["attributes"].keys()
|
and "ActualFinish" in self.settings["attributes"].keys()
|
||||||
):
|
):
|
||||||
del self.settings["attributes"]["ActualFinish"]
|
del self.settings["attributes"]["ActualFinish"]
|
||||||
|
|||||||
@@ -16,12 +16,12 @@ class Usecase:
|
|||||||
|
|
||||||
# If the user specifies both an end date and a duration, the duration takes priority
|
# If the user specifies both an end date and a duration, the duration takes priority
|
||||||
if (
|
if (
|
||||||
"ScheduleDuration" in self.settings["attributes"].keys()
|
self.settings["attributes"].get("ScheduleDuration", None)
|
||||||
and "ScheduleFinish" in self.settings["attributes"].keys()
|
and "ScheduleFinish" in self.settings["attributes"].keys()
|
||||||
):
|
):
|
||||||
del self.settings["attributes"]["ScheduleFinish"]
|
del self.settings["attributes"]["ScheduleFinish"]
|
||||||
if (
|
if (
|
||||||
"ActualDuration" in self.settings["attributes"].keys()
|
self.settings["attributes"].get("ActualDuration", None)
|
||||||
and "ActualFinish" in self.settings["attributes"].keys()
|
and "ActualFinish" in self.settings["attributes"].keys()
|
||||||
):
|
):
|
||||||
del self.settings["attributes"]["ActualFinish"]
|
del self.settings["attributes"]["ActualFinish"]
|
||||||
|
|||||||
Reference in New Issue
Block a user