quintel / etmoses

Online decision support tool to create local energy situations for neighbourhoods, cities and regions with a time resolution of 15 minutes created and maintained by Quintel – Not maintained
https://moses.energytransitionmodel.com
MIT License
11 stars 3 forks source link

[Airbrake] [Staging] Validation failed: Technology profile includes a connection to missing node "PV plant" #1399

Open dennisquintel opened 8 years ago

dennisquintel commented 8 years ago

Airbrake error: #5115 Airbrake project: ETMoses

Error type: ActiveRecord::RecordInvalid Error message: Validation failed: Technology profile includes a connection to missing node "PV plant" Where: testing_grounds#save_as Occurred at: Aug 26, 2016 14:50:21 UTC First seen at: Aug 26, 2016 14:50:21 UTC Occurrences: 1 (1 since last deploy on Aug 26, 2016 10:13:51 UTC)

URL: https://beta-moses.energytransitionmodel.com/testing_grounds/629/save_as File: [GEM_ROOT]/gems/activerecord-4.1.16/lib/active_record/validations.rb

Backtrace:

[GEM_ROOT]/gems/activerecord-4.1.16/lib/active_record/validations.rb:57:in save!
[GEM_ROOT]/gems/activerecord-4.1.16/lib/active_record/attribute_methods/dirty.rb:29:in save!
[GEM_ROOT]/gems/activerecord-4.1.16/lib/active_record/transactions.rb:273:in block in save!
[GEM_ROOT]/gems/activerecord-4.1.16/lib/active_record/transactions.rb:329:in block in with_transaction_returning_status
grdw commented 8 years ago

To reproduce:

  1. Create a LES
  2. Rename an Endpoint (any of them)
  3. Go to 'Save as' and create a new LES.
  4. Result: this error.

Now, I think it should not be possible to start renaming end-points. However, we do facilitate that option. There are two ways out:

  1. Rename every 'node' attribute of every LES
  2. Raise an error