browniebroke / django-codemod

A tool to automatically fix Django deprecations.

Home Page:https://django-codemod.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Codemodder: remove `context` argument of `Field.from_db_value()` and `Expression.convert_value()`

browniebroke opened this issue · comments

Description

From Django 2.0 release notes:

The context argument of Field.from_db_value() and Expression.convert_value() is unused as it’s always an empty dictionary.

The signature of both methods is now:

(self, value, expression, connection)

instead of:

(self, value, expression, connection, context)

We could probably update the usages of these methods.

This is removed in Django 3.0.