SACGF / SACGF/variantgrid

ValueError: Assertion error - expected most recent record to be last edited

Open
#1,343 2 comments 0 reactions 1 assignee Claimed by @TheMadBug View on GitHub
Dominant language
Python
Stars
30
Forks
3
Avg merge
9h 28m
Merged PRs (30d)
42

Description

This has happened 43 times over the last 4 years

View details in Rollbar: [https://app.rollbar.com/a/jimmy.andrews/fix/item/VariantGrid/3417](https://app.rollbar.com/a/jimmy.andrews/fix/item/VariantGrid/3417)

```
Traceback (most recent call last):
File "/data/variantgrid/classification/views/classification_view.py", line 276, in insert
raise ValueError('Assertion error - expected most recent record to be last edited')
ValueError: Assertion error - expected most recent record to be last edited
```

Code context is:

```
recent_modifications = list(ClassificationModification.objects.filter(classification=record.id).order_by('-created')[:2])
resolution = 'closed'
if recent_modifications:
latest_mod = recent_modifications[0]
if not latest_mod.is_last_edited:
raise ValueError('Assertion error - expected most recent record to be last edited')
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.