- Revision
- 15319
- Author
- morgen
- Date
- 2007-09-12 10:22:19 -0700 (Wed, 12 Sep 2007)
Log Message
Fix for bug 10730 (Unstamping taskness from an occurrence while another Chandler makes a change to same occurrence results in server error) r=Jeffrey
Modified Paths
Diff
Modified: trunk/chandler/parcels/osaf/sharing/Translator.txt (15318 => 15319)
--- trunk/chandler/parcels/osaf/sharing/Translator.txt 2007-09-11 23:57:42 UTC (rev 15318) +++ trunk/chandler/parcels/osaf/sharing/Translator.txt 2007-09-12 17:22:19 UTC (rev 15319) @@ -67,7 +67,7 @@ >>> t.startExport() >>> records = list(t.exportItem(item)) >>> records - [ItemRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', u'Translator test', '200 -1167792143.00 1', Decimal("1164803131"), 0, 0, 0), ModifiedByRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', u'', Decimal("1164803131"), 500), DisplayAlarmRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', NoChange, None, None, None)] + [ItemRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', u'Translator test', '200 -1167792143.00 1', Decimal("1164803131"), 0, 0, 0), ModifiedByRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', u'', Decimal("1164803131"), 500), DisplayAlarmRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', None, None, None, None)] Autoresolving Conflicts: @@ -186,7 +186,7 @@ >>> t.startExport() >>> records = list(t.exportItem(item)) >>> records - [ItemRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', u'Translator test', '100 -1167792400.00 1', Decimal("1164803131"), 0, 0, 0), ModifiedByRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', u'', Decimal("1164803131"), 500), DisplayAlarmRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', NoChange, None, None, None), NoteRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', u'This is the body', u'f230dcd4-7c32-4c3f-908b-d92081cc9a89', Inherit, Inherit, u'')] + [ItemRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', u'Translator test', '100 -1167792400.00 1', Decimal("1164803131"), 0, 0, 0), ModifiedByRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', u'', Decimal("1164803131"), 500), DisplayAlarmRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', None, None, None, None), NoteRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', u'This is the body', u'f230dcd4-7c32-4c3f-908b-d92081cc9a89', Inherit, Inherit, u'')] TODO: icaluid @@ -222,7 +222,7 @@ >>> t.startExport() >>> records = list(t.exportItem(item)) >>> records - [ItemRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', u'Translator test', '100 -1167792400.00 1', Decimal("1164803131"), 0, 0, 0), ModifiedByRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', u'', Decimal("1164803131"), 500), DisplayAlarmRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', NoChange, None, None, None), NoteRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', u'This is the body', u'f230dcd4-7c32-4c3f-908b-d92081cc9a89', Inherit, Inherit, u''), TaskRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89')] + [ItemRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', u'Translator test', '100 -1167792400.00 1', Decimal("1164803131"), 0, 0, 0), ModifiedByRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', u'', Decimal("1164803131"), 500), DisplayAlarmRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', None, None, None, None), NoteRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89', u'This is the body', u'f230dcd4-7c32-4c3f-908b-d92081cc9a89', Inherit, Inherit, u''), TaskRecord('f230dcd4-7c32-4c3f-908b-d92081cc9a89')] MailMessageRecord type
Modified: trunk/chandler/parcels/osaf/sharing/tests/round_trip.py (15318 => 15319)
--- trunk/chandler/parcels/osaf/sharing/tests/round_trip.py 2007-09-11 23:57:42 UTC (rev 15318) +++ trunk/chandler/parcels/osaf/sharing/tests/round_trip.py 2007-09-12 17:22:19 UTC (rev 15319) @@ -1780,7 +1780,7 @@ # Assign an alarm (I'm cheating by getting the translator to do the # work for me): trans = sharing.SharingTranslator(view0) - trans.importRecord(sharing.DisplayAlarmRecord(item, u'', u'-PT42M', + trans.importRecord(sharing.DisplayAlarmRecord(item, u'Event Reminder', u'-PT42M', None, None)) self.share0.conduit.filters.remove('cid:[email protected]') view0.commit(); stats = self.share0.sync(forceUpdate=True); view0.commit() @@ -1822,7 +1822,7 @@ state0 = self.share0.states.getByAlias(trans.getAliasForItem(item0)) state0.clear() item0.delete() - view0.commit(); stats = self.share0.sync(debug=True); view0.commit() + view0.commit(); stats = self.share0.sync(); view0.commit() self.assert_(checkStats(stats, ({'added' : 0, 'modified' : 0, 'removed' : 0}, {'added' : 0, 'modified' : 0, 'removed' : 0})),
Modified: trunk/chandler/parcels/osaf/sharing/translator.py (15318 => 15319)
--- trunk/chandler/parcels/osaf/sharing/translator.py 2007-09-11 23:57:42 UTC (rev 15318) +++ trunk/chandler/parcels/osaf/sharing/translator.py 2007-09-12 17:22:19 UTC (rev 15319) @@ -323,9 +323,6 @@ # value for event status, so treat None as NoChange eim.add_converter(model.EventRecord.status, type(None), lambda x: eim.NoChange) -eim.add_converter(model.DisplayAlarmRecord.description, type(None), - lambda x: eim.NoChange) - # Cosmo will generate a value of empty string even if Chandler hasn't provided # a value for triage, so treat empty string as NoChange def emptyToNoChange(s): @@ -1594,7 +1591,8 @@ reminder = item.getUserReminder() if reminder is not None: - if record.description not in noChangeOrInherit: + if (record.description not in noChangeOrInherit and + record.description is not None): reminder.description = record.description if record.duration not in noChangeOrInherit:
_______________________________________________ Commits mailing list [email protected] http://lists.osafoundation.org/mailman/listinfo/commits
