nycmeshnet / meshdb

A convenient, stable, and sane database for tracking Members and Nodes for use with robots and humans
https://db.mesh.nycmesh.net
MIT License
8 stars 13 forks source link

Fix: crash on import due to foreign key issue #478

Closed Andrew-Dickinson closed 3 weeks ago

Andrew-Dickinson commented 3 weeks ago

Import was crashing because the trick I used to change the ID of an object doesn't work when other objects reference it, kinda makes sense. Instead I use a trick where we construct a new object with the same ID as the one we want to replace, and then just call .save() to force the update. Easy

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.76%. Comparing base (9de5ed6) to head (48b25d4). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #478 +/- ## ======================================= Coverage 92.76% 92.76% ======================================= Files 62 62 Lines 2308 2308 ======================================= Hits 2141 2141 Misses 167 167 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.