danielschnoll
danielschnoll

Reputation: 3604

Break Down Django Query object (Q)

After doing a query in a Django script I wrote, I was given this Q object.

<Q: (AND: ('lesson_object_id__in', [322, 327, 328, 329, 330, 332, 1120, 1176]))>

I want to break down that Q object so I only have the list [322, 327, 328, 329, 330, 332, 1120, 1176]. How would I go by doing that? Thanks

Upvotes: 1

Views: 148

Answers (1)

danielschnoll
danielschnoll

Reputation: 3604

I had it wrapped in the Q() parentheses. Duplicating the query and storing it in the variable list(lesson_ids) fixed it.

Upvotes: 1

Related Questions