mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Fix #4224. Fix sequencing lint bugs.
This commit is contained in:
@@ -70,7 +70,7 @@ class Usecase:
|
||||
elif self.settings["relating_product"]:
|
||||
for reference in self.settings["relating_product"].ReferencedBy:
|
||||
if reference.is_a("IfcRelAssignsToProduct"):
|
||||
related_object = referenced_by.RelatedObjects[0]
|
||||
related_object = reference.RelatedObjects[0]
|
||||
if related_object:
|
||||
assignments = self.settings["related_object"].HasAssignments
|
||||
for assignment in assignments:
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
import datetime
|
||||
import ifcopenshell.util.date
|
||||
from math import floor
|
||||
from functools import lru_cache
|
||||
|
||||
|
||||
@@ -221,7 +222,7 @@ def is_work_time_applicable_to_day(work_time, day):
|
||||
return False # TODO
|
||||
elif recurrence.RecurrenceType == "MONTHLY_BY_POSITION":
|
||||
if not recurrence.Interval and not recurrence.Occurrences:
|
||||
return (day.weekday() + 1) in recurrence.WeekdayComponent and math.floor(
|
||||
return (day.weekday() + 1) in recurrence.WeekdayComponent and floor(
|
||||
day.day / 7
|
||||
) + 1 == recurrence["Position"]
|
||||
return False # TODO
|
||||
@@ -237,7 +238,7 @@ def is_work_time_applicable_to_day(work_time, day):
|
||||
return (
|
||||
day.month in recurrence.MonthComponent
|
||||
and (day.weekday() + 1) in recurrence.WeekdayComponent
|
||||
and math.floor(day.day / 7) + 1 == recurrence.Position
|
||||
and floor(day.day / 7) + 1 == recurrence.Position
|
||||
)
|
||||
return False # TODO
|
||||
|
||||
|
||||
Reference in New Issue
Block a user