app/models/esa/account.rb in event_sourced_accounting-0.2.2 vs app/models/esa/account.rb in event_sourced_accounting-0.2.3
- old
+ new
@@ -33,10 +33,10 @@
after_initialize :initialize_defaults
before_validation :update_normal_balance
validates_presence_of :type, :name, :chart, :normal_balance
- validates_uniqueness_of :code, :scope => :chart_id
+ validates_uniqueness_of :code, :scope => :chart_id, :allow_nil => true
validates_uniqueness_of :name, :scope => :chart_id
# The balance of the account.
#
# @example