79233110

Date: 2024-11-28 08:41:57
Score: 1.5
Natty:
Report link

Use .values_list() methods to get only the IDs as tuples:

topping_ids = pizza.toppings.all().values_list("id")
# Example of result ( (4), (5), (12), (54) )
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Eriel Mejias