This is the shape of my models.
class SomeModel(model):
some_field = models.DateTimeField(blank=True, null=True)
class OtherModel(Model):
list_of_some_models = models.ManyToManyField(SomeModel)
I have a dictionary like this, where each element in the list is the SomeModel pk:
{
"list_of_some_models": [1, 10, 12, 20]
}
I would like to check if there is already a record that has a relationship with SomeModel of id 1, 10, 12 and 20.
is it possible?