Compare commits

...

4 Commits

Author SHA1 Message Date
Pau Pérez Fabregat
cc3a0877c4 Merge pull request #3849 from luisramos0/pr_3839
Get PR 3839 to 2-0-1
2019-05-13 15:27:04 +02:00
Pau Perez
bb12592a74 Report cache diff to Bugsnag in a new tab
This will allow us to see the difference between the cache entry and the
actual shopfront. Otherwise, there is no way to see what wasn't
refreshed in the cache.
2019-05-10 22:02:11 +01:00
Pau Pérez Fabregat
f951ebe178 Merge pull request #3813 from luisramos0/3803-on-demand-default
Make stock locations backorderable_default false
2019-05-07 09:16:34 +02:00
luisramos0
bcc21cdade Make stock locations backorderable_default false.
This is required because when the default stock location is created, the backorderable_default column doesnt exist and when this column is created, the initial default is true. This is why we need to force it to false here. This column is the default value for on_demand which must be false.
2019-05-06 20:56:22 +01:00
3 changed files with 14 additions and 2 deletions

View File

@@ -3,7 +3,14 @@ require 'open_food_network/products_cache_integrity_checker'
ProductsCacheIntegrityCheckerJob = Struct.new(:distributor_id, :order_cycle_id) do
def perform
unless checker.ok?
Bugsnag.notify RuntimeError.new("Products JSON differs from cached version for distributor: #{distributor_id}, order cycle: #{order_cycle_id}"), diff: checker.diff.to_s(:text)
exception = RuntimeError.new(
"Products JSON differs from cached version for distributor: #{distributor_id}, " \
"order cycle: #{order_cycle_id}"
)
Bugsnag.notify(exception) do |report|
report.add_tab(:products_cache, diff: checker.diff.to_s(:text))
end
end
end

View File

@@ -0,0 +1,5 @@
class UpdateStockLocationsBackorderableDefault < ActiveRecord::Migration
def change
Spree::StockLocation.update_all(backorderable_default: false)
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20190501143327) do
ActiveRecord::Schema.define(:version => 20190506194625) do
create_table "adjustment_metadata", :force => true do |t|
t.integer "adjustment_id"