Skip to content

Commit

Permalink
Address ruff failures
Browse files Browse the repository at this point in the history
  • Loading branch information
ababic committed Feb 24, 2024
1 parent 603e78b commit 552845a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/wagtail_bynder/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def update_from_asset_data(
super().update_from_asset_data(asset_data)

# Update the focal area if a focus point is set
focus_point = asset_data.get("activeOriginalFocusPoint", None)
focus_point = asset_data.get("activeOriginalFocusPoint")
if focus_point:
self.set_focal_area_from_focus_point(
int(focus_point["x"]),
Expand Down Expand Up @@ -357,7 +357,7 @@ def update_from_asset_data(
f"asset are: {derivatives}"
) from None

self.fallback_source_url = derivatives.get(fallback_derivative_name, None)
self.fallback_source_url = derivatives.get(fallback_derivative_name)

thumbnails = asset_data["thumbnails"]
try:
Expand Down
2 changes: 1 addition & 1 deletion src/wagtail_bynder/wagtail_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def hide_image_and_document_summary_items(request, summary_items):
summary_items[:] = [
item
for item in summary_items
if not isinstance(item, (ImagesSummaryItem, DocumentsSummaryItem))
if not isinstance(item, ImagesSummaryItem | DocumentsSummaryItem)
]


Expand Down

0 comments on commit 552845a

Please sign in to comment.