forked from kevadesu/forgejo
fix: use better code to group UID and stopwatches
- Instead of having code that relied on the result being sorted (which wasn't specified in the query and therefore not safe to assume so). Use a map where it doesn't care if the result that we get from the database is sorted or not. - Added unit test.
This commit is contained in:
parent
1e1b162cbe
commit
e4eb82b738
4 changed files with 58 additions and 22 deletions
11
models/issues/TestGetUIDsAndStopwatch/stopwatch.yml
Normal file
11
models/issues/TestGetUIDsAndStopwatch/stopwatch.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
-
|
||||
id: 3
|
||||
user_id: 1
|
||||
issue_id: 2
|
||||
created_unix: 1500988004
|
||||
|
||||
-
|
||||
id: 4
|
||||
user_id: 3
|
||||
issue_id: 0
|
||||
created_unix: 1500988003
|
Loading…
Add table
Add a link
Reference in a new issue