File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 1- __version__ = "1.8.0 "
1+ __version__ = "1.8.1 "
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ async def import_data(
9595 raise HTTPException (status_code = 400 , detail = "Invalid file" )
9696
9797 for category in data .get ("categories" , []):
98- category_name = category .get ("category" , {}). get ( " name" )
98+ category_name = category .get ("name" )
9999 category_exists = session .exec (
100100 select (Category ).filter (Category .user == current_user , Category .name == category_name )
101101 ).first ()
@@ -126,7 +126,7 @@ async def import_data(
126126 new_category = Category (** category_data )
127127 session .add (new_category )
128128 session .flush ()
129- session .refresh ()
129+ session .refresh (new_category )
130130
131131 places = []
132132 for place in data .get ("places" , []):
You can’t perform that action at this time.
0 commit comments