@@ -101,25 +101,24 @@ def import_fracas_problems(self, fracas_path: str) -> None:
101101 premise_nodes = problem .findall ("p" )
102102 premises = [node .text .strip () for node in premise_nodes if node .text ]
103103
104- with transaction .atomic ():
105- Problem .objects .create (
106- type = Problem .ProblemType .FRACAS ,
107- content = json .dumps (
108- {
109- "fracas_id" : int (problem_id ),
110- "question" : question ,
111- "hypothesis" : hypothesis ,
112- "answer" : answer ,
113- "fracas_answer" : fracas_answer ,
114- "fracas_non_standard" : fracas_nonstandard ,
115- "note" : note ,
116- "section_name" : section ,
117- "subsection_name" : subsection ,
118- "premises" : premises ,
119- }
120- ),
121- )
122- created += 1
104+ Problem .objects .create (
105+ type = Problem .ProblemType .FRACAS ,
106+ content = json .dumps (
107+ {
108+ "fracas_id" : int (problem_id ),
109+ "question" : question ,
110+ "hypothesis" : hypothesis ,
111+ "answer" : answer ,
112+ "fracas_answer" : fracas_answer ,
113+ "fracas_non_standard" : fracas_nonstandard ,
114+ "note" : note ,
115+ "section_name" : section ,
116+ "subsection_name" : subsection ,
117+ "premises" : premises ,
118+ }
119+ ),
120+ )
121+ created += 1
123122
124123 logger .info (
125124 f"FraCaS problems import complete! Total: { created } | Skipped: { skipped } "
0 commit comments