Fixed bugs, added serialization for documents state

This commit is contained in:
Anton Stubenbord
2023-01-06 18:22:43 +01:00
parent 738ef99bc5
commit 23bcb355b1
76 changed files with 1333 additions and 595 deletions

View File

@@ -47,7 +47,7 @@ class DioHttpErrorInterceptor extends Interceptor {
errorMessages.putIfAbsent(entry.key, () => entry.value.toString());
}
}
return handler.reject(
handler.reject(
DioError(
error: errorMessages,
requestOptions: err.requestOptions,

View File

@@ -1,2 +1,8 @@
typedef JSON = Map<String, dynamic>;
typedef PaperlessValidationErrors = Map<String, String>;
typedef PaperlessLocalizedErrorMessage = String;
extension ValidationErrorsUtils on PaperlessValidationErrors {
bool get hasFieldUnspecificError => containsKey("non_field_errors");
String? get fieldUnspecificError => this['non_field_errors'];
}