@@ -30,11 +30,11 @@ def layout(gddid=None):
3030 # get the metadata of the article
3131 if os .path .exists (os .path .join ("data" ,
3232 "data-review-tool" ,
33- "completed " ,
33+ "processed " ,
3434 f"{ gddid } .json" )):
3535 article = open (os .path .join ("data" ,
3636 "data-review-tool" ,
37- "completed " ,
37+ "processed " ,
3838 f"{ gddid } .json" ), "r" )
3939 else :
4040 article = open (os .path .join ("data" ,
@@ -499,7 +499,7 @@ def cell_clicked(n_clicks):
499499 str: The href of the home button
500500 """
501501 if n_clicks :
502- return f"http://0.0.0.0:8050 /"
502+ return f"/"
503503 else :
504504 return dash .no_update
505505
@@ -843,7 +843,10 @@ def save_submit(submit, save, relevant, data):
843843 results ["last_updated" ] = datetime .now ().strftime ("%Y-%m-%d" )
844844 gddid = results ["gddid" ]
845845 data = json .dumps (results )
846- with open (f"data/data-review-tool/completed/{ gddid } .json" , "w" ) as f :
846+ with open (os .path .join ("data" ,
847+ "data-review-tool" ,
848+ "processed" ,
849+ f"{ gddid } .json" ), "w" ) as f :
847850 f .write (data )
848851 return dmc .Notification (
849852 title = "Review Complete!" ,
@@ -858,7 +861,10 @@ def save_submit(submit, save, relevant, data):
858861 results ["last_updated" ] = datetime .now ().strftime ("%Y-%m-%d" )
859862 gddid = results ["gddid" ]
860863 data = json .dumps (results )
861- with open (f"data/data-review-tool/completed/{ gddid } .json" , "w" ) as f :
864+ with open (os .path .join ("data" ,
865+ "data-review-tool" ,
866+ "processed" ,
867+ f"{ gddid } .json" ), "w" ) as f :
862868 f .write (data )
863869 return dmc .Notification (
864870 title = "Article Removed!" ,
@@ -872,7 +878,10 @@ def save_submit(submit, save, relevant, data):
872878 results ["status" ] = "In Progress"
873879 gddid = results ["gddid" ]
874880 data = json .dumps (results )
875- with open (f"data/data-review-tool/completed/{ gddid } .json" , "w" ) as f :
881+ with open (os .path .join ("data" ,
882+ "data-review-tool" ,
883+ "processed" ,
884+ f"{ gddid } .json" ), "r" ) as f :
876885 f .write (data )
877886 return dmc .Notification (
878887 title = "Progress Saved!" ,
0 commit comments