Skip to content

Conversation

evgenyslab
Copy link
Contributor

Generation crashes when using a model with a property as such:

from datetime import date
from model_utils.models import TimeStampedModel

class MyModel(TimeStampedModel):
   some_date = models.DateField(default=date.today, verbose_name="someDate")

^ this will crash because inspect.getmodule(value) when value = date.today returns NoneType which has no __name__.

@imakecodes imakecodes merged commit d9dff66 into makecodes:main Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants