Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading elog and andes events multinet conflict #164

Closed
upsonp opened this issue Jun 25, 2024 · 0 comments
Closed

Loading elog and andes events multinet conflict #164

upsonp opened this issue Jun 25, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@upsonp
Copy link
Collaborator

upsonp commented Jun 25, 2024

A user had started a mission loading events from elog which had created an instrument 'Other - MULTINET', but then later switched to loading events from an Andes report which created the instrument 'Net - multinet'. This caused a conflict

File "C:\DEV\pythonProjects\dart2\core\parsers\andes.py", line 145, in parse_events
    instrument = instruments.get(name__iexact=instrument_name)
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\DEV\pythonProjects\dart2\dart_env\Lib\site-packages\django\db\models\query.py", line 640, in get
    raise self.model.MultipleObjectsReturned(
core.models.Instrument.MultipleObjectsReturned: get() returned more than one Instrument -- it returned 2!

To resolve the issue I've added a check to check the instrument type along with the instrument name in the core.parsers.andes.parse_event() function

upsonp added a commit to upsonp/dart that referenced this issue Jun 25, 2024
@upsonp upsonp added the bug Something isn't working label Jun 25, 2024
@upsonp upsonp added this to the 3.3.0 milestone Jun 25, 2024
@upsonp upsonp mentioned this issue Jun 25, 2024
upsonp added a commit to upsonp/dart that referenced this issue Jun 25, 2024
@upsonp upsonp closed this as completed Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant