mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-30 16:43:00 +00:00
black .
This commit is contained in:
@@ -694,8 +694,7 @@ class BCFDB(MyDB):
|
||||
snapshot_type = ""
|
||||
snapshot = False
|
||||
set_snapshot = ""
|
||||
cypher_viewpoint = (
|
||||
"""
|
||||
cypher_viewpoint = """
|
||||
MATCH (u:User)-[r1:HAS_ACTIONS_ON]->(p:Project)-[r2:HAS]->(t:Topic)
|
||||
WHERE u.username = $username
|
||||
AND r1.createViewpoint = True
|
||||
@@ -713,9 +712,7 @@ class BCFDB(MyDB):
|
||||
v.spaces_visible = $spaces_visible,
|
||||
v.space_boundaries_visible = $space_boundaries_visible,
|
||||
v.openings_visible = $openings_visible
|
||||
"""
|
||||
% set_snapshot
|
||||
)
|
||||
""" % set_snapshot
|
||||
if viewpoint.guid is None:
|
||||
viewpoint.guid = uuid4()
|
||||
if viewpoint.orthogonal_camera is None:
|
||||
@@ -1450,8 +1447,7 @@ class BCFDB(MyDB):
|
||||
else:
|
||||
document_url = ""
|
||||
document_reference.url = ""
|
||||
cypher = (
|
||||
"""
|
||||
cypher = """
|
||||
MATCH (u:User)-[r1:HAS_ACTIONS_ON]->(p:Project)-[r2:HAS]->(t:Topic)
|
||||
WHERE u.username = $username
|
||||
AND r1.updateDocumentReferences = True
|
||||
@@ -1461,9 +1457,7 @@ class BCFDB(MyDB):
|
||||
SET r3.guid: $document_reference_id,
|
||||
%s
|
||||
d.description = $description
|
||||
"""
|
||||
% document_url
|
||||
)
|
||||
""" % document_url
|
||||
result = tx.run(
|
||||
cypher,
|
||||
username=current_user.username,
|
||||
|
||||
@@ -36,17 +36,14 @@ class DOCDB(MyDB):
|
||||
else:
|
||||
version_index_criteria = "AND d.version_index = $version_index"
|
||||
|
||||
cypher = (
|
||||
"""
|
||||
cypher = """
|
||||
MATCH (d:Document)
|
||||
WHERE d.document_id = $document_id
|
||||
%s
|
||||
RETURN d AS document
|
||||
ORDER by d.version_index DESC
|
||||
LIMIT 1
|
||||
"""
|
||||
% version_index_criteria
|
||||
)
|
||||
""" % version_index_criteria
|
||||
|
||||
result = tx.run(cypher, document_id=document_id, version_index=version_index)
|
||||
|
||||
@@ -891,8 +888,7 @@ class DOCDB(MyDB):
|
||||
else:
|
||||
version_index_criteria = ""
|
||||
|
||||
cypher = (
|
||||
"""
|
||||
cypher = """
|
||||
MATCH (u:User)-[r3:HAS_ACTIONS_ON]->(p:Project)-[r4:CONTAINS]->(d:Document)
|
||||
WHERE u.username = $username
|
||||
AND d.document_id = $document_id
|
||||
@@ -900,9 +896,7 @@ class DOCDB(MyDB):
|
||||
RETURN d AS document
|
||||
ORDER by d.version_index DESC
|
||||
LIMIT 1
|
||||
"""
|
||||
% version_index_criteria
|
||||
)
|
||||
""" % version_index_criteria
|
||||
|
||||
result = tx.run(
|
||||
cypher, username=current_user.username, document_id=document_id, version_index=version_index
|
||||
@@ -927,8 +921,7 @@ class DOCDB(MyDB):
|
||||
else:
|
||||
version_index_criteria = ""
|
||||
|
||||
cypher = (
|
||||
"""
|
||||
cypher = """
|
||||
MATCH (u:User)-[r3:HAS_ACTIONS_ON]->(p:Project)-[r4:CONTAINS]->(d:Document)
|
||||
WHERE u.username = $username
|
||||
AND d.document_id = $document_id
|
||||
@@ -936,9 +929,7 @@ class DOCDB(MyDB):
|
||||
RETURN d AS document
|
||||
ORDER by d.version_index DESC
|
||||
LIMIT 1
|
||||
"""
|
||||
% version_index_criteria
|
||||
)
|
||||
""" % version_index_criteria
|
||||
|
||||
result = tx.run(
|
||||
cypher, username=current_user.username, document_id=document_id, version_index=version_index
|
||||
|
||||
Reference in New Issue
Block a user