ScilifelabDataCentre / OrderPortal

A portal for orders (requests, project applications, etc) to a facility from its users.
MIT License
6 stars 12 forks source link

Error 500 when updating the `Account configuration` page #1220

Open Hammarn opened 4 months ago

Hammarn commented 4 months ago

So this seems to be caused by the field Subject terms being empty. As far as I can tell other fields can be empty and not cause the error when saving the page.

pekrau commented 4 months ago

(Sorry, I forgot this.) The line:

https://github.com/ScilifelabDataCentre/OrderPortal/blob/ae10cb276f409eb885740d5bda52b966291d4047/orderportal/admin.py#L1116

needs to be changed to:

            try:
                dialect = csv.Sniffer().sniff(indata)
            except csv.Error:
                dialect = "excel"