This is a snapshot of Indico's old Trac site. Any information contained herein is most probably outdated. Access our new GitHub site here.

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#146 closed defect (fixed)

Favorites: exception when adding existing user

Reported by: dmartinc Owned by: dmartinc
Priority: normal Milestone: v0.97.0
Component: General Version: 0.97.0
Keywords: favorites Cc:

Description

When modifying my favorites, if I try to add a user that is already on the list, we get this exception:

2010-01-26 11:24:24,573 indico.rpc - ERROR json.py:122

Service request failed. Request text:
{"version":"1.1","method":"user.favorites.addUsers","params":{"value":[{"fax":"","name":"David Martín Clavo","firstName":"David","title":"Mr.","familyName":"xxx","telephone":"73826","id":"19181","affiliation":"CERN","address":"xxxxx","email":"xxx@cern.ch"}]}}

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/cds_indico-0.97b2-py2.4.egg/MaKaC/services/interface/rpc/json.py", line 106, in process
    result = invokeMethod(str(requestBody["method"]), requestBody.get("params", []), req)
  File "/usr/lib/python2.4/site-packages/cds_indico-0.97b2-py2.4.egg/MaKaC/services/interface/rpc/process.py", line 84, in invokeMethod
    raise e
ServiceError: ERR-U1 : Element already exists in list! (no inner exception)

Change History (5)

comment:1 Changed 6 years ago by pferreir

  • Milestone set to v0.97

comment:2 Changed 6 years ago by jbenito

  • Owner set to dmartinc
  • Priority changed from low to normal
  • Status changed from new to assigned

comment:3 Changed 6 years ago by dmartinc

  • Status changed from assigned to accepted

comment:4 Changed 6 years ago by david.martin.clavo@…

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

commit 56571d604401c422378afc259f25c3cbc8d6fe1a
Author: David Martín Clavo <david.martin.clavo@…>
Date: Wed Feb 24 13:44:46 2010 +0100

[FIX] Favourite exceptions and others


-fixes #146
-fix: removed raise ServiceError? when adding an already
present favourite or removing a favourite that was not
in the favourite basket.
-imp: included "_type" and "_fossil" in all fossilized objects.
Added restriction to fossil interface name: I*Fossil.
-imp: took the opportunity to implement 3 levels of Avatar fossils
-fix: properly make the "fossilize" function available in templates
-imp: used fossilized avatars in UserListBasket? service, and in lists of
users in plugin options.
-fix: check for "_type" == "Avatar" in avatars added to UserListWidget?
on widget build. If so, their key is "existingAv
*". This way they are
not duplicated when we add one that was already in the list on page load.
-imp: updated testFossilize.py to take into account "_type" and "_fossil"

comment:5 Changed 5 years ago by David Martín Clavo <david.martin.clavo@…>

In [56571d604401c422378afc259f25c3cbc8d6fe1a]:

[FIX] Favourite exceptions and others

-fixes #146
-fix: removed raise ServiceError? when adding an already
present favourite or removing a favourite that was not
in the favourite basket.
-imp: included "_type" and "_fossil" in all fossilized objects.
Added restriction to fossil interface name: I*Fossil.
-imp: took the opportunity to implement 3 levels of Avatar fossils
-fix: properly make the "fossilize" function available in templates
-imp: used fossilized avatars in UserListBasket? service, and in lists of
users in plugin options.
-fix: check for "_type" == "Avatar" in avatars added to UserListWidget?
on widget build. If so, their key is "existingAv
*". This way they are
not duplicated when we add one that was already in the list on page load.
-imp: updated testFossilize.py to take into account "_type" and "_fossil"

Note: See TracTickets for help on using tickets.