Correct longstanding issues with the EVEAccount object regarding its primary key

This commit is contained in:
2011-05-19 16:00:27 +01:00
parent 1533d937f4
commit d1afc15fc0
8 changed files with 177 additions and 15 deletions

View File

@@ -155,7 +155,7 @@ def import_eve_character_func(character_id, api_key=None, user_id=None, logger=l
pchar.save()
try:
acc = EVEAccount.objects.get(api_user_id=user_id)
acc = EVEAccount.objects.get(pk=user_id)
if not pchar.id in acc.characters.all().values_list('id', flat=True):
acc.characters.add(pchar)