Si vous constatez la perte de tickets, de commentaires ou de projets, veuillez consulter la page

Commit dc9392e6 authored by Phyks (Lucas Verney)'s avatar Phyks (Lucas Verney)

Fix an error with photos hashes in the fetch command

parent 35c902d3
Pipeline #79788 failed with stage
in 5 minutes and 6 seconds
......@@ -15,6 +15,7 @@ import math
import re
import time
import imagehash
import mapbox
import requests
import unidecode
......@@ -128,7 +129,13 @@ class DateAwareJSONEncoder(json.JSONEncoder):
def default(self, o): # pylint: disable=locally-disabled,E0202
if isinstance(o, (, datetime.datetime)):
return o.isoformat()
return json.JSONEncoder.default(self, o)
return json.JSONEncoder.default(self, o)
except TypeError:
# Discard image hashes
if isinstance(o, imagehash.ImageHash):
return None
def pretty_json(data):
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment