Skip to content

Commit

Permalink
backport collection import to 0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Their Name committed Dec 3, 2023
1 parent 2484bd7 commit def23f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions journal/management/commands/collection.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import json
import sys

from django.core.management.base import BaseCommand

from catalog.models import Item
from common.utils import get_uuid_or_404
from journal.models import *
from takahe.utils import *
from users.models import APIdentity
from users.models import User


# TODO make this available in UI
Expand Down Expand Up @@ -53,7 +53,7 @@ def process_export(self, collection_uuid):
print(json.dumps(data, indent=2))

def process_import(self, username):
owner = APIdentity.objects.get(username=username, local=True)
owner = User.objects.get(username=username)
data = json.load(sys.stdin)
collection = Collection.objects.create(
owner=owner,
Expand Down

0 comments on commit def23f8

Please sign in to comment.