Sync util big update

This commit is contained in:
tmshv committed 2016-02-27 16:19:08 +03:00
1 parent 1e80bae401
commit 40321327d6
30 files changed
+1001 -159

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
from sync.image import sync_image
from utils.fn import key_mapper
unpop_image = key_mapper('image', lambda i: sync_image(i)['_id'])
def create_product(doc):
# author, image, title, awards, teacher, date
product = {**doc}
unpop_image(product)
return product