1
0
mirror of https://github.com/django/django.git synced 2025-10-29 00:26:07 +00:00

Limited lines to 119 characters in django/{contrib,db}.

Refs #23395.
This commit is contained in:
Berker Peksag
2014-10-25 07:42:44 +03:00
committed by Tim Graham
parent 349471eeb9
commit c9178ef17a
10 changed files with 69 additions and 30 deletions

View File

@@ -174,7 +174,8 @@ class RenameField(Operation):
def state_forwards(self, app_label, state):
# Rename the field
state.models[app_label, self.model_name.lower()].fields = [
(self.new_name if n == self.old_name else n, f) for n, f in state.models[app_label, self.model_name.lower()].fields
(self.new_name if n == self.old_name else n, f)
for n, f in state.models[app_label, self.model_name.lower()].fields
]
# Fix unique_together to refer to the new field
options = state.models[app_label, self.model_name.lower()].options