#15 closed defect (duplicate)
Metasystem unique_together doesn't work for an object that's related inline
Reported by: | Adrian Holovaty | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Metasystem | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
See unique_together
in music.MusicianInBand
, which causes this when ManipulatorAdd is instantiated:
Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/worldonline/cms/core/handler.py", line 123, in get_response return callback(request, **param_dict) File "/usr/lib/python2.3/site-packages/worldonline/cms/views/admin/main_new.py", line 608, in change_stage manipulator = mod.ChangeManipulator(object_id) File "/usr/lib/python2.3/site-packages/worldonline/cms/models/meta.py", line 77, in _curried return args[0](*(args[1:]+moreargs), **dict(kwargs.items() + morekwargs.items())) File "/usr/lib/python2.3/site-packages/worldonline/cms/models/meta.py", line 1008, in manipulator_init self.fields.extend(f.get_manipulator_fields(rel_opts, self, name_prefix='%s.%d.' % (rel_opts.object_name.lower(), i), rel=True)) File "/usr/lib/python2.3/site-packages/worldonline/cms/models/meta.py", line 1279, in get_manipulator_fields params['validator_list'].append(getattr(manipulator, 'isUnique%sFor%s' % (i, j))) AttributeError: BandManipulatorChange instance has no attribute 'isUniquemusician_idForband_id'
Note:
See TracTickets
for help on using tickets.
#265 explains the problem more generically and includes a patch.