Skip to content

Commit

Permalink
Removed unnecessary "else" statements.
Browse files Browse the repository at this point in the history
I have removed "else" because it's unnecessary and the "return" statement stops our code in the "if" block.
  • Loading branch information
thesayfulla committed Oct 1, 2023
1 parent e1da814 commit ca3e114
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
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
3 changes: 1 addition & 2 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

0 comments on commit ca3e114

Please sign in to comment.