rawgento_db 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rawgento_db/query.rb +2 -2
- data/lib/rawgento_db/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f126b9d037e291509e4e149fece44f4450506a45
|
|
4
|
+
data.tar.gz: 9d9d1272743d6deb392f9ff2784990f3879ae866
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b8fe8be150648f8900d6b041ce507f9087e4870a8a90cb148b0b51b4aa88a773b83ea3ed44bed46ab33ba272953e5095a48114bda940134bc82f6c7872de3cae
|
|
7
|
+
data.tar.gz: 2e7fa8cc0e1bfffb0b34b1fa86702704f9d867f3c475327785eda8390bfbec9c2b95245f42a0f15f2c8897befcc20185c2329227f662f11b732f26d7a8108795
|
data/lib/rawgento_db/query.rb
CHANGED
|
@@ -47,11 +47,11 @@ module RawgentoDB
|
|
|
47
47
|
def self.set_available_on_stock product_id, settings=RawgentoDB.settings
|
|
48
48
|
result = client(settings).query(
|
|
49
49
|
"SELECT is_in_stock FROM cataloginventory_stock_item "\
|
|
50
|
-
"WHERE product_id = %d AND is_in_stock = 0 AND qty > 0"
|
|
50
|
+
"WHERE product_id = %d AND is_in_stock = 0 AND qty > 0" % product_id)
|
|
51
51
|
if result.length && result[0] == 0
|
|
52
52
|
result = client(settings).query(
|
|
53
53
|
"UPDATE cataloginventory_stock_item SET is_in_stock = 1 "\
|
|
54
|
-
"WHERE product_id = %d"
|
|
54
|
+
"WHERE product_id = %d" % product_id)
|
|
55
55
|
result
|
|
56
56
|
else
|
|
57
57
|
"unclear what happened"
|
data/lib/rawgento_db/version.rb
CHANGED