Merge pull request #4459 from FinnStutzenstein/fixUpdatingMotions
set allow_null for integerfields, when they are not required
This commit is contained in:
commit
1fecf941c8
@ -109,6 +109,7 @@ export class LocalPermissionsService {
|
||||
motion.state.allow_submitter_edit &&
|
||||
motion.submitters &&
|
||||
motion.submitters.length &&
|
||||
!this.operator.isAnonymous &&
|
||||
motion.submitters.some(submitter => submitter.id === this.operator.user.id))
|
||||
);
|
||||
}
|
||||
@ -139,6 +140,7 @@ export class LocalPermissionsService {
|
||||
this.operator.hasPerms('motions.can_manage_metadata') ||
|
||||
(motion.state &&
|
||||
motion.state.allow_submitter_edit &&
|
||||
!this.operator.isAnonymous &&
|
||||
motion.submitters &&
|
||||
motion.submitters.some(submitter => submitter.id === this.operator.user.id))
|
||||
);
|
||||
|
@ -68,7 +68,7 @@ class MotionBlockSerializer(ModelSerializer):
|
||||
"""
|
||||
|
||||
agenda_type = IntegerField(
|
||||
write_only=True, required=False, min_value=1, max_value=3
|
||||
write_only=True, required=False, min_value=1, max_value=3, allow_null=True
|
||||
)
|
||||
agenda_parent_id = IntegerField(write_only=True, required=False, min_value=1)
|
||||
|
||||
@ -397,7 +397,7 @@ class MotionSerializer(ModelSerializer):
|
||||
min_value=1, required=False, validators=[validate_workflow_field]
|
||||
)
|
||||
agenda_type = IntegerField(
|
||||
write_only=True, required=False, min_value=1, max_value=3
|
||||
write_only=True, required=False, min_value=1, max_value=3, allow_null=True
|
||||
)
|
||||
agenda_parent_id = IntegerField(write_only=True, required=False, min_value=1)
|
||||
submitters = SubmitterSerializer(many=True, read_only=True)
|
||||
|
@ -11,7 +11,7 @@ class TopicSerializer(ModelSerializer):
|
||||
"""
|
||||
|
||||
agenda_type = IntegerField(
|
||||
write_only=True, required=False, min_value=1, max_value=3
|
||||
write_only=True, required=False, min_value=1, max_value=3, allow_null=True
|
||||
)
|
||||
agenda_parent_id = IntegerField(write_only=True, required=False, min_value=1)
|
||||
agenda_comment = CharField(write_only=True, required=False, allow_blank=True)
|
||||
|
Loading…
Reference in New Issue
Block a user