Don't set default value for on_change and set id
issue3487 review2501002
This commit is contained in:
1 parent
6663c2ef29
commit
2cd0da0d57
2 files changed
+6
-3
No files matched your search
@@ -45,7 +45,9 @@ class SelectionMixin(object):
|
||||
|
||||
if 'relation' not in self.attrs:
|
||||
change_with = self.attrs.get('selection_change_with') or []
|
||||
key = record._get_on_change_args(change_with).items()
|
||||
args = record._get_on_change_args(change_with)
|
||||
del args['id']
|
||||
key = args.items()
|
||||
key.sort()
|
||||
self.init_selection(tuple(key))
|
||||
else:
|
||||
|
||||
@@ -516,10 +516,11 @@ class Record(SignalEvent):
|
||||
scope = values
|
||||
for i in arg.split('.'):
|
||||
if i not in scope:
|
||||
scope = None
|
||||
break
|
||||
scope = scope[i]
|
||||
res[arg] = scope
|
||||
else:
|
||||
res[arg] = scope
|
||||
res['id'] = self.id
|
||||
return res
|
||||
|
||||
def on_change(self, fieldname, attr):
|
||||
|
||||
Reference in new issue
Block a user