allow override of default limit (<200) on articles on shared suppliers (#609)

This commit is contained in:
Tom Carchrae 2019-01-14 17:55:12 -08:00 committed by Patrick Gansterer
parent a66a44bdcf
commit 31689dfb75
3 changed files with 4 additions and 1 deletions

View file

@ -18,7 +18,7 @@ class SharedSupplier < ActiveRecord::Base
# return list of synchronisation methods available for this supplier
def shared_sync_methods
methods = []
methods += %w(all_available all_unavailable) if shared_articles.count < 200
methods += %w(all_available all_unavailable) if shared_articles.count < FoodsoftConfig[:shared_supplier_article_sync_limit]
methods += %w(import) # perhaps, in the future: if shared_articles.count > 20
methods
end