Flush settings cache on legal doc mandatority check

This commit is contained in:
Alex Sherman 2020-07-02 14:27:06 +05:00
parent a80e813632
commit 4a2176d5d7
6 changed files with 63 additions and 2 deletions

View file

@ -8,7 +8,8 @@ module Concerns
end
def legaldoc_not_mandatory?
legaldoc_optout || !Setting.legal_document_is_mandatory
setting = Setting.find_by(var: 'legal_document_is_mandatory')&.value
legaldoc_optout || !setting
end
end
end