diff --git a/data/model/legacy.py b/data/model/legacy.py index c8e304ecb..31801f1da 100644 --- a/data/model/legacy.py +++ b/data/model/legacy.py @@ -1304,7 +1304,15 @@ def set_image_metadata(docker_image_id, namespace_name, repository_name, created # We cleanup any old checksum in case it's a retry after a fail fetched.storage.checksum = None - fetched.storage.created = dateutil.parser.parse(created_date_str).replace(tzinfo=None) + fetched.storage.created = datetime.now() + + if created_date_str is not None: + try: + fetched.storage.created = dateutil.parser.parse(created_date_str).replace(tzinfo=None) + except: + # parse raises different exceptions, so we cannot use a specific kind of handler here. + pass + fetched.storage.comment = comment fetched.storage.command = command