File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 MapDocumentToken ,
99)
1010from sqlalchemy .sql .functions import coalesce
11- from sqlalchemy import or_ , text
11+ from sqlalchemy import or_
1212from app .save_share .locks import check_map_lock
1313from sqlalchemy .exc import NoResultFound , MultipleResultsFound
1414from app .core .db import get_session
@@ -59,9 +59,7 @@ def get_protected_document(
5959 stmt = select (Document )
6060
6161 if document_id .is_public :
62- stmt = stmt .where (Document .public_id == document_id .value ).where (
63- text ("map_metadata->>'draft_status' = 'ready_to_share'" )
64- )
62+ stmt = stmt .where (Document .public_id == document_id .value )
6563 else :
6664 stmt = stmt .where (Document .document_id == document_id .value )
6765
@@ -135,9 +133,7 @@ def get_document_public(
135133 )
136134
137135 if document_id .is_public :
138- stmt = stmt .where (Document .public_id == document_id .value ).where (
139- text ("map_metadata->>'draft_status' = 'ready_to_share'" )
140- )
136+ stmt = stmt .where (Document .public_id == document_id .value )
141137 else :
142138 stmt = stmt .where (Document .document_id == document_id .value )
143139
You can’t perform that action at this time.
0 commit comments