codeforboston / codeforboston/voiceapp311

Order of returned Crimes on crime_activity_intent

Open
#311 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
40
Forks
46
PR merge metrics
No merged PRs in 30d

Description

Hi Guys,
Just looking at the code for the first time! It looks great, easy to read and understand.

I did notice what looks like a bug in the `crime_activity_intent`. I'm not 100% sure but I don't think the "latest" crimes are being returned by the app.

I think adding an ORDER BY to the SQL query on crime_incidents_api_utils.py line 48 will fix this.
```
'''SELECT * FROM "{}" WHERE "Lat" LIKE '{}%' AND "Long" LIKE '{}%' ORDER BY "OCCURRED_ON_DATE" DESC LIMIT {}'''
```

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.