mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 02:07:57 -06:00
fix: Make custom fields not nullable and default to empty array
This commit is contained in:
@@ -51,7 +51,7 @@ class DocumentModel extends Equatable {
|
||||
|
||||
// Only present if full_perms=true
|
||||
final Permissions? permissions;
|
||||
final Iterable<CustomFieldModel>? customFields;
|
||||
final Iterable<CustomFieldModel> customFields;
|
||||
|
||||
const DocumentModel({
|
||||
required this.id,
|
||||
@@ -71,7 +71,7 @@ class DocumentModel extends Equatable {
|
||||
this.owner,
|
||||
this.userCanChange,
|
||||
this.permissions,
|
||||
this.customFields,
|
||||
this.customFields = const [],
|
||||
});
|
||||
|
||||
factory DocumentModel.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
@@ -14,5 +14,6 @@ class Permissions with _$Permissions {
|
||||
@HiveField(1) required UsersAndGroupsPermissions change,
|
||||
}) = _Permissions;
|
||||
|
||||
factory Permissions.fromJson(Map<String, dynamic> json) => _$PermissionsFromJson(json);
|
||||
factory Permissions.fromJson(Map<String, dynamic> json) =>
|
||||
_$PermissionsFromJson(json);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user