I have a Model in Django. It has a Group and inside the group are Cameras.
class Groups(models.Model):
groupName = models.CharField(max_length=255)
class Cameras(models.Model):
group = models.ForeignKey(Groups)
cameraID = models.IntegerField()
When I try to remove a Camera or set of cameras in the model.
camera = Cameras.objects.filter(cameraID=int(camID))
camera.delete()
It removes any camera with an ID Greater than 0. But If I have a camera ID of '0' It fails to remove. Any ideas why this would be.
Cameras.objects.filter(cameraID=0).delete()from a shell?