﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
27530	Referencing a function in a model field definition, and then removing that reference (and function) after running a migration raises an exception	Jesse	nobody	"With a FileField you can define a function for the upload_to argument. If you reference a function within that field, and then decide to modify the field later by removing the function reference (and also the function), the migrations will cause the server to fail to start because it can't find the function that was previously referenced.

For example:

{{{
def destination():
  return ""path""

...

file = models.FileField(upload_to=destination)
}}}

Then later on I decide I don't need the function

{{{
file = models.FileField(upload_to=""hardcoded path"")
}}}

Now whenever I try to run the server locally or do a migration, I get: ""AttributeError: 'module' object has no attribute 'destination'"". The only meaningful workaround is to delete all migrations"	Uncategorized	closed	Uncategorized	1.10	Normal	invalid			Unreviewed	0	0	0	0	0	0
