lib/sequel/plugins/bitemporal.rb in sequel_bitemporal-0.6.14 vs lib/sequel/plugins/bitemporal.rb in sequel_bitemporal-0.6.15
- old
+ new
@@ -421,10 +421,10 @@
futures = futures.where "valid_from>?", pending_version.valid_from
futures = futures.order(:valid_from).all
to_check_columns = self.class.version_class.columns - excluded_columns
updated_by = (send(self.class.audit_updated_by_method) if audited?)
- previous_values = @current_version_values
+ previous_values = @current_version_values || {}
current_version_values = pending_version.values
futures.each do |future_version|
attrs = {}
to_check_columns.each do |col|