summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunwox <me@unwox.com>2025-03-14 22:56:52 +0600
committerunwox <me@unwox.com>2025-03-14 22:56:52 +0600
commit3e9baeff59bdb9da78f41276f01a1fb9a52e0193 (patch)
tree4d1a47e06e3678d15ff61b2eca692c883127e950
parent493acae9aa58523f323588d5b5f23f31acfb0f0f (diff)
moychay: do not try to store absent image
-rw-r--r--parser/moychay.fnl4
1 files changed, 3 insertions, 1 deletions
diff --git a/parser/moychay.fnl b/parser/moychay.fnl
index cec6a77..864ccc4 100644
--- a/parser/moychay.fnl
+++ b/parser/moychay.fnl
@@ -35,7 +35,9 @@
:weight weight
:volume (parser.guess-volume product.name)
:price price
- :image (.. "https://moychay.ru" product.image)
+ :image (if product.image
+ (.. "https://moychay.ru" product.image)
+ nil)
:url (.. "https://moychay.ru" product.url)
:price-per (if (and price weight (< 0 weight))
(/ (math.ceil (* (/ price weight) 10)) 10)