Skip to content

Commit

Permalink
fixed a bug where the user was able to insert ref==alt variants
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinDo committed Oct 27, 2023
1 parent 159b067 commit 828fc4d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/frontend_celery/webapp/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,9 @@ def validate_and_insert_variant(chrom, pos, ref, alt, genome_build, conn: Connec
message = message + "\"" + str(alt) + "\""
elif not pos_is_valid:
message = "Position is invalid: " + str(pos)
if ref == alt:
message = "Equal reference and alternative base are not allowed."
alt_is_valid = False
if not chrom_is_valid or not ref_is_valid or not alt_is_valid or not pos_is_valid:
was_successful = False
return was_successful, message, variant_id
Expand Down

0 comments on commit 828fc4d

Please sign in to comment.