Save many metafields with a single request
还没有人认领这个 Issue。
评估
调研方向
首先跟踪 Product.save()、add_metafields() 和 Metafield().save(),以了解获取的 metafields 是如何表示和持久化的。当本地附加的 metafields 能够与新 product 一起通过一次 API 请求保存,并覆盖报告的多个 metafields 情况时,工作即告完成。
由索引模型根据 Issue 内容生成。
描述
There does not seem to be a way to attach metafields locally, and then simply save the product with the metafields along with it. I'm forced to use add_metafields() or Metafield().save(), both of which adds a single metafield per API call. This is very slow.
If I take a product with 50 metafields, and save it as a new product, it saves almost instantly, like so:
p = shopify.Product.find()[0]
print len(p.metafields())
> 50
p.id = None
p.images = None
p.save()
How can I attach metafields to a product in the same way they are attached when they are fetched?
- 主要语言
- Python
- 星标
- 1.4k
- 派生
- 388
- 平均合并
- 5 小时 39 分钟
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Shopify/shopify_python_api 的其他 Issue
-
automated
难度 3/5 1-2 天 新手友好度 68/100
Shopify/shopify_python_api#799 ·
-
automated Stale
难度 4/5 3-5 天 新手友好度 35/100
Shopify/shopify_python_api#796 · 2 条评论 ·
-
automated
难度 4/5 3-5 天 新手友好度 35/100
Shopify/shopify_python_api#792 ·
-
feature request
难度 2/5 1-3 小时 新手友好度 45/100
Shopify/shopify_python_api#275 · 4 条评论 ·
-
feature request
难度 2/5 1-3 小时 新手友好度 38/100
Shopify/shopify_python_api#233 ·
查看 Shopify/shopify_python_api 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 90/100
learningequality/ricecooker#747 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 76/100
run-llama/llama_index#23199 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
KhronosGroup/glTF-Blender-IO#2769 ·