Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
yu23ki14 committed Jan 20, 2025
2 parents 416a5ff + e0532f0 commit 90754f3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion common/birdxplorer_common/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CORSSettings(BaseSettings):
allow_methods: list[str] = ["GET"]
allow_headers: list[str] = ["*"]

allow_origins: list[str] = []
allow_origins: list[str] = ["*"]


class GlobalSettings(BaseSettings):
Expand Down
4 changes: 0 additions & 4 deletions common/birdxplorer_common/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,10 +576,8 @@ def search_notes_with_posts(
if post_impression_count_from:
query = query.filter(PostRecord.impression_count >= post_impression_count_from)
if post_includes_media:
# Only include posts that have media
query = query.filter(PostRecord.media_details.any())
if post_includes_media is False:
# Only include posts that don't have media
query = query.filter(~PostRecord.media_details.any())

# Pagination
Expand Down Expand Up @@ -669,10 +667,8 @@ def count_search_results(
if post_impression_count_from:
query = query.filter(PostRecord.impression_count >= post_impression_count_from)
if post_includes_media:
# Only include posts that have media
query = query.filter(PostRecord.media_details.any())
if post_includes_media is False:
# Only include posts that don't have media
query = query.filter(~PostRecord.media_details.any())

return query.count()
Expand Down

0 comments on commit 90754f3

Please sign in to comment.