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:
rileywong311
2023-08-10 12:32:32 -07:00
parent 7dc3c62455
commit 15a8b4d120
+3 -4
View File
@@ -340,10 +340,9 @@ class Brick(blenderbim.core.tool.Brick):
@classmethod
def remove_brick(cls, brick_uri):
if BrickStore.graph.triples((URIRef(brick_uri), None, None)):
with BrickStore.new_changeset() as cs:
for triple in BrickStore.graph.triples((URIRef(brick_uri), None, None)):
cs.remove(triple)
with BrickStore.new_changeset() as cs:
for triple in BrickStore.graph.triples((URIRef(brick_uri), None, None)):
cs.remove(triple)
@classmethod
def run_assign_brick_reference(cls, element=None, library=None, brick_uri=None):