Open Christian-DONGMO opened 1 week ago
After I duplicate a scenario, if I try to navigate to a linked simulation, I get Internal Server Error. If I try to update one of it's injects, I'm also having Internal Server Error.
I'm also unsure simulations should be duplicated too. Edit : After checking with @jborozco, simulations of a scenario should not be duplicated.
If I duplicate the duplicate of a scenario, I get a Internal Server Error. I can see in the backend console log : "duplicate key value violates unique constraint "scenario_exercise_pkey"". I also still have linked from a scenarios to a simulation. I think those two issues are linked as you should get an empty list of simulations in a freshly created duplicate. I'm also having Internal Server Error when I try to duplicate an inject of a scenario.
Attention: Patch coverage is 8.09568%
with 999 lines
in your changes missing coverage. Please review.
Project coverage is 25.00%. Comparing base (
ae49c2c
) to head (7048e9f
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@Christian-DONGMO I still have an Internal Server Error if I duplicate the duplicate of a scenario. When looking at the console logs, I have the following : org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "scenario_exercise_pkey" Besides, when duplicating a scenario, the simulations list of that scenario is also duplicated when it should not be.
I think if you don't duplicate the simulations linked to a scenario, given the error in the console logs, that should get rid of the Internal Server Error as well.
@Christian-DONGMO : clean dbb, and new scenarios, new injects
Cas 1: Create scenario (add teams, add injects)->duplicate inject: Error
Cas 2: Create scenario (setup all) -> duplicate scenario: Error, the duplicated has an schedule time setted, is it normal? Documents on injects are not duplicated.
Cas 3: Create scenario (setup all) -> duplicated scenario 2eme fois: Error
Cas 4: Create scenario (setup all) -> duplicated scenario from a duplicated: Error
Cas 5: Create Scenario (setup all) -> duplicate inject in inject results ( I m not sure if on this part we could duplicate?): OK duplicated inject but status is no the same (draft vs finish)
Cas 6: Create scenario(setup all) -> If you click an exercise and duplicate this exercise, should this replace the others?
Cas 7: Create scenario (setup all) -> injects duplicated of a duplicated scenario has teams, assets, asset groups are doubles (?)
Proposed changes
Related issues
Checklist
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...