-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Creating DeleteCamera Task #271
Conversation
917a6e3
to
6a3b66d
Compare
6a3b66d
to
0c2a14a
Compare
a3ff1db
to
8fabe38
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jue-henry looking good! Few questions/comments here but it's very close.
src/api/db/models/Camera.ts
Outdated
} else { | ||
// make sure there's a Project.cameraConfig record for this camera | ||
// in the default_project and create one if not | ||
defaultProj = await Project.findOne({ _id: 'default_project' }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nathanielrindlaub slightly different approach to this than the unregisterCamera
method above, but I make sure default_project
exists first and then create a CameraConfig
in the default_project
project before creating the project registration. This way we make sure the project exists first, instead of having a camera project registration point to a non-existant project, but also not sure if this is even an issue that needs to be addressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jue-henry I don't think there not being a default_project
in the DB should be an issue. It gets created when we initially seed the DB in the src/scripts/seedDB.js
script. It is conceivable that someone might standing up their own Animl instance and not run the script, but that would cause a lot of other issues long before anyone every got to the point of deleting a camera, so I think it's safe to assume that default_project
exists.
This reverts commit 88ab398.
@@ -7,7 +7,7 @@ COPY ./ $HOME/ | |||
RUN apt-get update \ | |||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y curl git | |||
|
|||
RUN export NODEV='20.12.2' \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nathanielrindlaub needed to upgrade for the docker tests to run. Merging for now but open to discussion
No description provided.