[Update] 修改Mixin,允许org_id不填写

pull/1683/head
ibuler 6 years ago
parent d97e606503
commit c9d137bc20

@ -55,7 +55,7 @@ class OrgManager(models.Manager):
class OrgModelMixin(models.Model):
org_id = models.CharField(max_length=36, null=True, blank=True)
org_id = models.CharField(max_length=36, null=True, blank=True, default=None)
objects = OrgManager()
def save(self, *args, **kwargs):

@ -65,6 +65,7 @@ class UserGroupSerializer(BulkSerializerMixin, serializers.ModelSerializer):
model = UserGroup
list_serializer_class = BulkListSerializer
fields = '__all__'
read_only_fields = ['id', 'created_by']
@staticmethod
def get_users(obj):

Loading…
Cancel
Save