Skip to content
Snippets Groups Projects

F merge missing list datatype

Merged Florian Spreckelsen requested to merge f-merge-missing-list-datatype into dev
2 unresolved threads
Files
5
@@ -62,7 +62,6 @@ from caosdb.exceptions import (AmbiguousEntityError, AuthorizationError,
EntityDoesNotExistError, EntityError,
EntityHasNoDatatypeError, HTTPURITooLongError,
MismatchingEntitiesError, QueryNotUniqueError,
ServerConfigurationException,
TransactionError, UniqueNamesError,
UnqualifiedParentsError,
UnqualifiedPropertiesError)
@@ -1381,12 +1380,15 @@ def _parse_value(datatype, value):
# reference via name
return str(value)
except TypeError:
except TypeError as te:
# deal with invalid XML: List of values without appropriate datatype
if isinstance(value, list):
raise ServerConfigurationException(
"The server sent an invalid XML: List valued properties must be announced by "
raise TypeError(
"Invalid datatype: List valued properties must be announced by "
"the datatype.\n" + f"Datatype: {datatype}\nvalue: {value}")
else:
# Everything else that's not related to wrong list assignments
raise te
def _log_request(request, xml_body=None):
Loading