1
0

Fixed formula validation during import of defaults

Previously it did not consider in-memory records and failed sometimes
This commit is contained in:
cryptogopher
2020-05-11 22:38:27 +02:00
parent ffb87a09c4
commit 7584c650da
3 changed files with 16 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
module BodyTracking::ProjectPatch
Project.class_eval do
has_many :sources, dependent: :destroy
has_many :quantities, -> { order "lft" }, dependent: :destroy
has_many :quantities, -> { order "lft" }, inverse_of: :project, dependent: :destroy
has_many :units, dependent: :destroy
has_many :foods, -> { order "foods.name" }, dependent: :destroy,