Opened 17 years ago

Closed 17 years ago

Last modified 16 years ago

#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


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/", line 123, in get_response
    return callback(request, **param_dict)

  File "/usr/lib/python2.3/site-packages/worldonline/cms/views/admin/", line 608, in change_stage
    manipulator = mod.ChangeManipulator(object_id)

  File "/usr/lib/python2.3/site-packages/worldonline/cms/models/", 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/", 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/", 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'

Change History (1)

comment:1 Changed 17 years ago by Adrian Holovaty

Resolution: duplicate
Status: newclosed

#265 explains the problem more generically and includes a patch.

Note: See TracTickets for help on using tickets.
Back to Top