Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
c9d137bc
Commit
c9d137bc
authored
Aug 13, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改Mixin,允许org_id不填写
parent
d97e6065
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
mixins.py
apps/orgs/mixins.py
+1
-1
serializers.py
apps/users/serializers.py
+1
-0
No files found.
apps/orgs/mixins.py
View file @
c9d137bc
...
...
@@ -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
):
...
...
apps/users/serializers.py
View file @
c9d137bc
...
...
@@ -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
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment