montage icon indicating copy to clipboard operation
montage copied to clipboard

Importing duplicated files results in internal server error

Open yarl opened this issue 6 years ago • 3 comments

When posting payload below to /admin/round/<id>/import

{
  "import_method": "selected",
  "file_names": ["Bytom, Rynek 24.jpg","Bytom, Rynek 24.jpg","Bytom, Rynek 24.jpg","Bytom, Rynek 24.jpg","Bytom, Rynek 24.jpg"]
}

Response is 500 with detail: <ExceptionInfo [sqlalchemy.exc.IntegrityError: (...)

It should be handled more gracefully in order to properly handle on front-end.

yarl avatar May 18 '19 16:05 yarl

Should be part of the #141 list.

yarl avatar May 18 '19 16:05 yarl

From the api exception log, this appears to be a duplicate entry error. That shouldn't happen!

I'll add it to the list.

slaporte avatar May 19 '19 05:05 slaporte

Interestingly, this error occurs only for import_method=selected and does not occur for import_method=gistcsv

atsirlin avatar May 19 '19 08:05 atsirlin