Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #911 (closed defect: fixed)

Opened 11 years ago

Last modified 10 years ago

[PATCH][TEST] addRemoveName in Catwalk is being ignored

Reported by: dan@… Owned by: jorge.vargas
Priority: high Milestone: 1.0.2
Component: Toolbox.Catwalk Version: 0.9a6
Severity: normal Keywords: addRemoveName
Cc:

Description (last modified by jorge.vargas) (diff)

It seems that when I customize the addRemoveName parameter, Catwalk no longer adds things properly.

Here are two cases:

Case #1:

class List(SQLObject):
	name = StringCol(notNone=True)
	moderators = RelatedJoin('Member', addRemoveName='Moderator', joinColumn='list_id', otherColumn='member_id', intermediateTable='list_moderator')
	members = RelatedJoin('Member')

class Member(SQLObject):
	fname = StringCol(notNone=True)
	lname = StringCol(notNone=True)
	moderatorFor = RelatedJoin('List', addRemoveName='ModeratorFor', joinColumn='member_id', otherColumn='list_id', intermediateTable='list_moderator')
	lists = RelatedJoin('List')

With this setup, I can add members, I can add lists, and I can even put members into lists. However when I try to add a moderator to a list, it just adds another member.

No errors are generated, but it's calling the addMember method instead of calling the addModerator method.

Case #2:

class Member(SQLObject):
	fname = StringCol(notNone=True)
	lname = StringCol(notNone=True)
	submembers = RelatedJoin('Member', addRemoveName='SubMember', joinColumn='member_id', otherColumn='sub_member_id', intermediateTable='sub_member')

If I want to have a RelatedJoin? that relates to itself, I cannot do this either. Catwalk displays the submembers relation, but when I click save as I try to add submembers I get an error, member object has no attribute addMember.

Both cases seem like they are not ignoring the addRemoveName which I have set.

Attachments

addremove.patch Download (5.8 KB) - added by Joost 10 years ago.
patch with testcase

Change History

comment:1 Changed 11 years ago by jorge.vargas

  • Description modified (diff)
  • Component changed from Toolbox to Toolbox.Catwalk
  • Severity changed from major to normal
  • Milestone changed from 0.9 to 1.0

can you please provide a patch?

comment:2 Changed 10 years ago by jorge.vargas

  • Milestone changed from 1.0 to 1.0b3

Changed 10 years ago by Joost

patch with testcase

comment:3 Changed 10 years ago by Joost

  • Summary changed from addRemoveName in Catwalk is being ignored to [PATCH] addRemoveName in Catwalk is being ignored

comment:4 Changed 10 years ago by alberto

  • Milestone changed from 1.0b3 to 1.1

comment:5 Changed 10 years ago by jorge.vargas

  • Milestone changed from 1.1 to 1.0.2

comment:6 Changed 10 years ago by JoostM

  • Summary changed from [PATCH] addRemoveName in Catwalk is being ignored to [PATCH][TEST] addRemoveName in Catwalk is being ignored

Is there any reason why this patch can't be applied?

comment:7 Changed 10 years ago by jorge.vargas

  • Owner changed from anonymous to jorge.vargas

sorry Catwalk is waiting for someone to maintain it.

I'll take a look and see if it can be applied.

comment:8 Changed 10 years ago by alberto

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

Applied at [2852]. Thanks Joost :)

Alberto

Note: See TracTickets for help on using tickets.