mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 14:31:39 +00:00
Remove another needless BrickStore.graph.triples check
As before, this returns a generator type which always evaluates true, even if it is empty.
This commit is contained in:
@@ -340,10 +340,9 @@ class Brick(blenderbim.core.tool.Brick):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def remove_brick(cls, brick_uri):
|
def remove_brick(cls, brick_uri):
|
||||||
if BrickStore.graph.triples((URIRef(brick_uri), None, None)):
|
with BrickStore.new_changeset() as cs:
|
||||||
with BrickStore.new_changeset() as cs:
|
for triple in BrickStore.graph.triples((URIRef(brick_uri), None, None)):
|
||||||
for triple in BrickStore.graph.triples((URIRef(brick_uri), None, None)):
|
cs.remove(triple)
|
||||||
cs.remove(triple)
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run_assign_brick_reference(cls, element=None, library=None, brick_uri=None):
|
def run_assign_brick_reference(cls, element=None, library=None, brick_uri=None):
|
||||||
|
|||||||
Reference in New Issue
Block a user