Skip to content

Commit

Permalink
adding support for export in legacy db schema [for the old tinydb]
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyBRoswell committed Dec 5, 2024
1 parent 4ab0e59 commit dfa5834
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import json
import os.path

from django.core.management import CommandParser
from django.core.management.base import BaseCommand, CommandError
from django.db.models import QuerySet

import common
from catalog.models import Cell
from catalog.serializers import CellSerializer

Expand All @@ -26,7 +26,7 @@ def handle(self, *args, **options):
for cell in queryset:
serializer = CellSerializer(cell)
cells[str(no)] = serializer.data
db_file: str = os.path.expanduser('~/NaaVRE/NaaVRE_db.json')
db_file: str = f'{common.project_root}/NaaVRE_db.json'
with open(db_file) as f:
db = json.load(f)
db['cells'] = cells
Expand Down

0 comments on commit dfa5834

Please sign in to comment.