Skip to content

Commit d05fc98

Browse files
Remove publish requirement
1 parent f552c3a commit d05fc98

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

backend/app/core/dependencies.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
MapDocumentToken,
99
)
1010
from sqlalchemy.sql.functions import coalesce
11-
from sqlalchemy import or_, text
11+
from sqlalchemy import or_
1212
from app.save_share.locks import check_map_lock
1313
from sqlalchemy.exc import NoResultFound, MultipleResultsFound
1414
from 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

0 commit comments

Comments
 (0)