mirror of https://github.com/jumpserver/jumpserver
parent
e48f36397e
commit
6e46a17d98
@ -0,0 +1,33 @@
|
||||
58
|
||||
|
||||
/root/env2.7/lib/python2.7/site-packages/django/db/models/fields/__init__.pyc in get_prep_value(self, value)
|
||||
944 if value is None:
|
||||
945 return None
|
||||
--> 946 return int(value)
|
||||
947
|
||||
948 def contribute_to_class(self, cls, name, **kwargs):
|
||||
|
||||
TypeError: int() argument must be a string or a number, not 'QuerySet'
|
||||
|
||||
In [6]: group.user_set.update(users)
|
||||
---------------------------------------------------------------------------
|
||||
TypeError Traceback (most recent call last)
|
||||
<ipython-input-6-94520763e8e7> in <module>()
|
||||
----> 1 group.user_set.update(users)
|
||||
|
||||
/root/env2.7/lib/python2.7/site-packages/django/db/models/manager.pyc in manager_method(self, *args, **kwargs)
|
||||
83 def create_method(name, method):
|
||||
84 def manager_method(self, *args, **kwargs):
|
||||
---> 85 return getattr(self.get_queryset(), name)(*args, **kwargs)
|
||||
86 manager_method.__name__ = method.__name__
|
||||
87 manager_method.__doc__ = method.__doc__
|
||||
|
||||
TypeError: update() takes exactly 1 argument (2 given)
|
||||
|
||||
In [7]: users
|
||||
Out[7]: <QuerySet [<User: christina86>, <User: tina71>, <User: emily71>, <User: tammy66>, <User: sarah66>, <User: linda75>, <User: ev
|
||||
elyn88>, <User: mildred72>, <User: sharon93>, <User: christina88>, <User: heather80>, <User: amy80>, <User: julia81>, <User: sarah89>
|
||||
, <User: phillip74>, <User: kimberly74>, <User: ann73>, <User: helen63>, <User: joyce77>, <User: debra67>, '...(remaining elements tr
|
||||
uncated)...']>
|
||||
|
||||
In [8]: group.user_set
|
Loading…
Reference in new issue