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
bb639415
Commit
bb639415
authored
Aug 12, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 修改批量更新资产的bug
parent
2354f0c9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
asset.py
apps/assets/serializers/asset.py
+1
-1
serializers.py
apps/users/serializers.py
+2
-1
requirements.txt
requirements/requirements.txt
+2
-2
No files found.
apps/assets/serializers/asset.py
View file @
bb639415
...
...
@@ -20,7 +20,7 @@ class AssetSerializer(BulkSerializerMixin, serializers.ModelSerializer):
model
=
Asset
list_serializer_class
=
BulkListSerializer
fields
=
'__all__'
validators
=
[]
# If not set to [], partial bulk update will be error
validators
=
[]
def
get_field_names
(
self
,
declared_fields
,
info
):
fields
=
super
()
.
get_field_names
(
declared_fields
,
info
)
...
...
apps/users/serializers.py
View file @
bb639415
...
...
@@ -23,6 +23,7 @@ class UserSerializer(BulkSerializerMixin, serializers.ModelSerializer):
'first_name'
,
'last_name'
,
'password'
,
'_private_key'
,
'_public_key'
,
'_otp_secret_key'
,
'user_permissions'
]
# validators = []
def
get_field_names
(
self
,
declared_fields
,
info
):
fields
=
super
(
UserSerializer
,
self
)
.
get_field_names
(
declared_fields
,
info
)
...
...
@@ -71,7 +72,7 @@ class UserGroupSerializer(BulkSerializerMixin, serializers.ModelSerializer):
class
UserGroupUpdateMemeberSerializer
(
serializers
.
ModelSerializer
):
users
=
serializers
.
PrimaryKeyRelatedField
(
many
=
True
,
queryset
=
User
.
objects
.
all
())
users
=
serializers
.
PrimaryKeyRelatedField
(
many
=
True
,
queryset
=
User
.
objects
.
all
())
class
Meta
:
model
=
UserGroup
...
...
requirements/requirements.txt
View file @
bb639415
...
...
@@ -14,11 +14,11 @@ coreapi==2.3.3
coreschema==0.0.4
cryptography==2.1.4
decorator==4.1.2
Django==2.
0.7
Django==2.
1.0
django-auth-ldap==1.3.0
django-bootstrap3==9.1.0
django-celery-beat==1.1.1
django-filter==
1.1
.0
django-filter==
2.0
.0
django-formtools==2.1
django-ranged-response==0.2.0
django-redis-cache==1.7.1
...
...
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