Fix offline gifting

This commit is contained in:
John 2015-07-13 18:13:17 +03:00
parent 87efdba167
commit b7d8cd0a3a

View file

@ -34,9 +34,9 @@ class CatalogManagerUD(DirectObject):
self.notify.warning('Unable to deliver gift: avId is not a DistributedToon!') self.notify.warning('Unable to deliver gift: avId is not a DistributedToon!')
return return
store = CatalogItem.Customization | CatalogItem.DeliveryDate | CatalogItem.GiftTag store = CatalogItem.Customization | CatalogItem.DeliveryDate
giftOnOrder = CatalogItemList.CatalogItemList(fields.get('setGiftSchedule', [''])[0], store=store) giftOnOrder = CatalogItemList.CatalogItemList(fields.get('setGiftSchedule', [''])[0], store=store)
giftOnOrder.append(CatalogItem.getItem(blob, store=store)) giftOnOrder.append(CatalogItem.getItem(blob, store=store | CatalogItem.GiftTag))
fields['setGiftSchedule'] = (giftOnOrder.getBlob(store=store),) fields['setGiftSchedule'] = (giftOnOrder.getBlob(store=store),)
self.air.dbInterface.updateObject(self.air.dbId, avId, self.air.dclassesByName['DistributedToonUD'], fields) self.air.dbInterface.updateObject(self.air.dbId, avId, self.air.dclassesByName['DistributedToonUD'], fields)