0

I get error when I want to use this style.

User.objects().update(kwargs)

How can I do it?

P.S This style working good

User.objects().update(state=1)
cmashinho
  • 605
  • 5
  • 21

1 Answers1

1

You want to unpack the dictionary:

User.objects().update(**kwargs)

Credit to @jonrsharpe for the appropriate question link.

Community
  • 1
  • 1
Rushy Panchal
  • 16,979
  • 16
  • 61
  • 94