Open tkhyn opened 5 years ago
Original comment by Thomas Khyn (Bitbucket: tkhyn, GitHub: tkhyn).
Hi, thanks for the detailed report.
I am deeply sorry but unfortunately I am no longer using django-gm2m nor django and have little to no time to dive again into it, so it is highly unlikely I will be able to help you with that.
I’ll gladly accept any PR that solves the issue, though.
Instad of:
subscribers = GM2MField('User', related_name='+',
through=SubscribedUser, through_fields=('subscription', 'content_object', 'content_type', 'subscriber_id'))
try:
subscribers = GM2MField(settings.AUTH_USER_MODEL, related_name='+',
through=SubscribedUser, through_fields=('subscription', 'content_object', 'content_type', 'subscriber_id'))
Original report by Aleksander Kowalczyk (Bitbucket: alex_kowalczyk, ).
Cannot make GM2MField relation to AUTH_USER_MODEL. The following exception happens:
The relation:
For some reason the code expects the
User
model to provide value insetting_name
attribute.Adding
setting_name='AUTH_USER_MODEL'
attribute (that’s undocumented) toUser
class to satisfy thedeconstruct
function just changes the exception: