mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 10:06:47 +00:00
Add support for editing calendar work and exception times and recurring work times
This commit is contained in:
@@ -7,11 +7,11 @@ class Usecase:
|
||||
|
||||
def execute(self):
|
||||
work_time = self.file.create_entity("IfcWorkTime")
|
||||
if self.settings["type"] == "WorkingTimes":
|
||||
if self.settings["time_type"] == "WorkingTimes":
|
||||
working_times = list(self.settings["work_calendar"].WorkingTimes or [])
|
||||
working_times.append(work_time)
|
||||
self.settings["work_calendar"].WorkingTimes = working_times
|
||||
elif self.settings["type"] == "ExceptionTimes":
|
||||
elif self.settings["time_type"] == "ExceptionTimes":
|
||||
exception_times = list(self.settings["work_calendar"].ExceptionTimes or [])
|
||||
exception_times.append(work_time)
|
||||
self.settings["work_calendar"].ExceptionTimes = exception_times
|
||||
|
||||
Reference in New Issue
Block a user