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

Marketmodel not updated and topology gone by removing LES #1421

Closed JeroenvdLogt closed 8 years ago

JeroenvdLogt commented 8 years ago

I made changes to the marketmodel TKI-SGE Usecase Presikhaaf standaard markmodel and TKI-SGE Usecase Presikhaaf standaard markmodel - Hoeveel flex

The business case of LES 'TKI-SGE: Usecase Presikhaaf netverzwaring conventioneel + stroomversnelling' and LES 'TKI-SGE: Usecase Presikhaaf standaard netwerk + hybride warmtepomp + batterijen' were not update however.

So I cloned the LES and removed the orginal LES. Thereby, however, the topology was also removed. Now I cannot open the LES anymore. Strange thing is that the topology is not in the topology list anymore but I am still able to view it within the LES.

ChaelKruip commented 8 years ago

So I cloned the LES and removed the orginal LES. Thereby, however, the topology was also removed.

This should not be possible right @antw @grdw?

ChaelKruip commented 8 years ago

@antw @grdw can you retrieve the topology for the LESses mentioned here? @JeroenvdLogt needs these LESses for a project with some time pressure.

JeroenvdLogt commented 8 years ago

I have to leave now, I have some time left to look at this after dinner. If there are questions you can call me Chael (I can answer your call in the train).

grdw commented 8 years ago

I gave the topology id 541 and market model id 232, from user id 42 (which is the orphan), back to user 67.

This is the same issue as #1414. It is not removed, just not visible to non-admin users. Also because you change the ownership of the topology by removing it, you're automatically exempt from viewing the LES. What happened is this:

  1. User created a LES with Topology 541 and Market Model 232
  2. Cloned that LES
  3. Removed the original LES
  4. The remove process moves the ownership of the Topology + Market Model to the orphan user since the clone is still using the Market Model and Topology in question
  5. LES is now private because the Market Model or Topology (in this case the Topology) is private and the user that's signed in is not able to view any of the LES's which contain parts which are not theirs. And since the orphan is a different user....

To summarize; this is the same issue as #1414

antw commented 8 years ago

I don't think this is the same as #1414, which says that deleting a topology from the topology page causes a LES to break. In this issue, deleting a LES caused the topology (and market model) to be reassigned to the orphan user, even though the topology owner was still using it elsewhere.

@JeroenvdLogt, @grdw has reassigned the market model and topology back to you, and you should be able to use them once again. I have fixed the bug; you can safely delete a LES with your other LESes remaining unaffected.