Skip to content

Commit

Permalink
Fix export asreview_prior not found
Browse files Browse the repository at this point in the history
  • Loading branch information
J535D165 committed Jan 5, 2024
1 parent 14db2c7 commit 07ec269
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions asreview/webapp/api/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -1176,10 +1176,11 @@ def api_export_dataset(project):
as_data = project.read_data()

# Add a new column 'is_prior' to the dataset
if "asreview_prior" in as_data.df:
as_data.df.drop("asreview_prior", axis=1, inplace=True)

state_df["asreview_prior"] = state_df.query_strategy.eq("prior").astype(int)
as_data.df = as_data.df.drop("asreview_prior", axis=1).join(
state_df["asreview_prior"].astype(int), on="record_id"
)
as_data.df = as_data.df.join(state_df["asreview_prior"], on="record_id")

# Adding Notes from State file to the exported dataset
# Check if exported_notes column already exists due to multiple screenings
Expand Down

0 comments on commit 07ec269

Please sign in to comment.