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 #1143 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

[PATCH] SQLAlchemy Identity classes don't allow adding related objects

Reported by: plewis Owned by: max
Priority: normal Milestone:
Component: Identity Version: 0.9a9
Severity: normal Keywords:
Cc:

Description

The User, Group, and Permission SQLAlchemy classes have circular references for user, group, and permission attributes. Apparently, these cancel each other out, and so no references can be added.

For instance, you should be able to get a user and say

user.group.append(groupObj)

But, you get an exception "'User' object has no attribute 'groups'

According to  this thread the secret is to delete one of the redundant references.

Attachments

identity_template.patch Download (689 bytes) - added by plewis 13 years ago.

Change History

Changed 13 years ago by plewis

comment:1 Changed 13 years ago by plewis

  • Summary changed from SQLAlchemy Identity classes don't allow adding related objects to [PATCH] SQLAlchemy Identity classes don't allow adding related objects

After this patch, I am able to access user.groups (in an new quickstarted project with --sqlalchemy).

comment:2 Changed 13 years ago by max

  • Owner changed from anonymous to max
  • Status changed from new to assigned

comment:3 Changed 13 years ago by max

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

It is already applied in SVN after 1.0b1.

comment:4 Changed 13 years ago by jorge.vargas

sorry this was my fault I did the changes but hit preview instead of save

this was commited on r1957 and r1958

Note: See TracTickets for help on using tickets.