Skip to content

Commit

Permalink
Merge 80c82f0 into 2148f75
Browse files Browse the repository at this point in the history
  • Loading branch information
thesayfulla authored Oct 10, 2023
2 parents 2148f75 + 80c82f0 commit 26c62eb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions changes/182.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove useless "else" statements.
3 changes: 1 addition & 2 deletions meta/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ def process_value(item):
return item(field)
except TypeError:
return item()
else:
return item
return item

if value:
try:
Expand Down
6 changes: 2 additions & 4 deletions meta/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@ def _normalize_media_url(self, url):
def image(self):
if self.image_object:
return self.image_object.get("url")
else:
return self._image
return self._image

@image.setter
def image(self, image):
Expand Down Expand Up @@ -245,8 +244,7 @@ def process_item(item):
return [process_item(value) for value in item]
elif isinstance(item, dict):
return {itemkey: process_item(itemvalue) for itemkey, itemvalue in item.items()}
else:
return item
return item

schema = {}
# object is immediately set here to recursion
Expand Down

0 comments on commit 26c62eb

Please sign in to comment.