provide 'data' argument when adding a favorite
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3713 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
		
							parent
							
								
									d70b5e5d44
								
							
						
					
					
						commit
						3918b8ebc7
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -48,14 +48,16 @@ class Favorites(object): | |||
|         for item in sorted(self.context.query(userName=personUid), key=sortKey): | ||||
|             yield item.taskId | ||||
| 
 | ||||
|     def add(self, obj, person): | ||||
|     def add(self, obj, person, data=None): | ||||
|         if None in (obj, person): | ||||
|             return False | ||||
|         uid = util.getUidForObject(obj) | ||||
|         personUid = util.getUidForObject(person) | ||||
|         if self.context.query(userName=personUid, taskId=uid): | ||||
|             return False | ||||
|         return self.context.saveUserTrack(uid, 0, personUid, {}) | ||||
|         if data is None: | ||||
|             data = {} | ||||
|         return self.context.saveUserTrack(uid, 0, personUid, data) | ||||
| 
 | ||||
|     def remove(self, obj, person): | ||||
|         if None in (obj, person): | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 helmutm
						helmutm