1.1 --- a/imiptools/stores/database/common.py Thu Oct 12 23:14:06 2017 +0200
1.2 +++ b/imiptools/stores/database/common.py Sat Oct 14 16:42:09 2017 +0200
1.3 @@ -735,11 +735,12 @@
1.4 self.cursor.execute(query, values)
1.5 return True
1.6
1.7 - def remove_counters(self, user, uid, recurrenceid=None):
1.8 + def remove_counters(self, user, uid, recurrenceid=None, attendee=None):
1.9
1.10 """
1.11 For the given 'user', remove all counter-proposals associated with the
1.12 - given 'uid' and 'recurrenceid'.
1.13 + given 'uid' and 'recurrenceid'. If 'attendee' is specified, only objects
1.14 + provided by this attendee will be removed.
1.15 """
1.16
1.17 table = self.get_event_table(recurrenceid, "counters")
1.18 @@ -751,6 +752,10 @@
1.19 columns = ["store_user", "object_uid"]
1.20 values = [user, uid]
1.21
1.22 + if attendee:
1.23 + columns.append("other")
1.24 + values.append(attendee)
1.25 +
1.26 query, values = self.get_query(
1.27 "delete from %(table)s :condition" % {
1.28 "table" : table