Remove member_id from geting object owner

This commit is contained in:
Tanner Collin 2021-12-08 22:19:46 +00:00
parent bf5c300c6c
commit 42d6cb35d7

View File

@ -22,13 +22,6 @@ def get_object_owner(obj):
if getattr(obj, 'instructor', False): if getattr(obj, 'instructor', False):
return full_name(obj.instructor.member), obj.instructor.member.id return full_name(obj.instructor.member), obj.instructor.member.id
if getattr(obj, 'member_id', False):
try:
member = models.Member.objects.get(id=obj.member_id)
return full_name(member), member.id
except models.Member.DoesNotExist:
pass
return 'Protospace', 0 return 'Protospace', 0
@receiver(post_create_historical_record, dispatch_uid='create_hist') @receiver(post_create_historical_record, dispatch_uid='create_hist')