Actually:
Query for tasks without relations to Product
tasks = Task.objects.filter(product__isnull=True)
after setting product field optional in as follows:
product = models.ForeignKey(Product, on_delete=models.CASCADE, null=True,
blank=True)
On Wednesday, May 1, 2024 at 4:59:46 PM UTC+3 Ryan
Hi Abdou KARAMBIZI,
Have you tried to make the product field in the Task model optional?
Like:
product = models.ForeignKey(Product, on_delete=models.CASCADE, null=True,
blank=True)
On Saturday, April 27, 2024 at 9:55:56 PM UTC+3 Abdou KARAMBIZI wrote:
> Hello friends,
>
> products =
2 matches
Mail list logo