[Sync] Image.id -> Image.ref

This commit is contained in:
Roman Timashev committed 2017-10-15 00:18:23 +03:00
1 parent 25a235f5cf
commit bd87428f8e
5 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -45,7 +45,7 @@ class Image(Model):
else:
doc = await Image.find_one({'file': file})
img = Image(provider, file, doc['data'], url_factory)
img.__set_id(doc['_id'])
img.ref = doc['_id']
return img
@@ -93,7 +93,7 @@ class Image(Model):
async def save(self):
c = sync_image(self.bake())
self.__set_id(c['_id'])
self.ref = c['_id']
def bake(self):
return {