TromsFylkestrafikk / ragnarok

Harvest public transport data for statistics usage
0 stars 0 forks source link

UI show delete fetched chunk button for old chunks #83

Closed tfk-kaare closed 2 months ago

tfk-kaare commented 3 months ago

52 set a restriction on how chunks that were allowed to delete. But the UI isn't in sync with this for older chunks. There is a gap in chunks that display the delete fetch icon. It re-appears a few pages out.

I suspect there is some month/year setting that is improperly parsed.

tfk-kaare commented 3 months ago

Mmm.. The model attribute canDeleteFetched() uses the chunk attribute chunk_date which I want to get rid of. It makes more sense to dis-allow deletion of chunks that have been fetched a certain amount of time ago.

Also, the column chunk_date isn't populated in all cases, causing this bug to be triggered.

So, just to fix this bug, make sure chunk_date is properly set. Otherwise, switch to used fetched_at for comparison.

tft-abel commented 2 months ago

You need to create a pull request, such that it can officially be "reviewed" in GitHub, then I can approve it. The changes look simple and straight forward :)