Stale read when auto-creating an image's server
Sentry Issue: ARKINDEX-BACKEND-C8
UniqueViolation: duplicate key value violates unique constraint "images_imageserver_url_key"
DETAIL: Key (url)=(https://demo.arkindex.org/uploads/iiif/2) already exists.
File "django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
IntegrityError: duplicate key value violates unique constraint "images_imageserver_url_key"
DETAIL: Key (url)=(https://demo.arkindex.org/uploads/iiif/2) already exists.
(22 additional frame(s) were not displayed)
...
File "django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)