Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_colors(*args, **kwargs):
- colors = Color.objects.none()
- for paint in Paint.objects.all():
- if paint.color and paint.color not in colors:
- colors.add(paint.color)
- return colors
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement