remove duplicate attachment url check (#608)

This commit is contained in:
Osma Ahvenlampi 2023-07-14 22:52:04 +03:00 committed by GitHub
parent b2a9b334be
commit 2d140f2e97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 4 deletions

View File

@ -939,10 +939,6 @@ class Post(StatorModel):
# These have no IDs, so we have to wipe them each time
post.attachments.all().delete()
for attachment in get_list(data, "attachment"):
if "url" not in attachment.keys():
# sometimes attachments don't have URLs. Skip them.
print(f"no URL for {attachment} in {post}")
continue
if "focalPoint" in attachment:
try:
focal_x, focal_y = attachment["focalPoint"]