Skip to content

Commit

Permalink
fix(Backend topic images): Adjust validate function
Browse files Browse the repository at this point in the history
  • Loading branch information
saengel committed Nov 7, 2023
1 parent c9c3527 commit 5241a67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sefaria/model/topic.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _validate(self):
assert self.subclass in self.subclass_map, f"Field `subclass` set to {self.subclass} which is not one of the valid subclass keys in `Topic.subclass_map`. Valid keys are {', '.join(self.subclass_map.keys())}"
if getattr(self, 'image', False):
try:
self.image.index("https://storage.googleapis.com/img.sefaria.org/topics/")
self.image["image_uri"].index("https://storage.googleapis.com/img.sefaria.org/topics/")
except ExternalImageError:
print("The image is not stored properly. Topic should be stored in the image GCP bucket, in the topics subdirectory.")

Expand Down

0 comments on commit 5241a67

Please sign in to comment.