Code

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#15 closed defect (duplicate)

Metasystem unique_together doesn't work for an object that's related inline

Reported by: adrian Owned by: adrian
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: UI/UX:

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'

Attachments (0)

Change History (1)

comment:1 Changed 9 years ago by adrian

  • Resolution set to duplicate
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.