remove duplicate attachment url check (#608)

pull/611/head
Osma Ahvenlampi 2023-07-14 22:52:04 +03:00 zatwierdzone przez GitHub
rodzic b2a9b334be
commit 2d140f2e97
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 0 dodań i 4 usunięć

Wyświetl plik

@ -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"]