Closed jpmckinney closed 1 month ago
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
app/sources/colombia.py | 22 | 70.45% | ||
<!-- | Total: | 22 | --> |
Totals | |
---|---|
Change from base Build 10333456317: | 0.02% |
Covered Lines: | 2039 |
Relevant Lines: | 2359 |
@jpmckinney, I had to fix the sorting to make this work, but let me know if you have a better way of doing it. The sort fields are the ones available in the front end.
I didn't see your commit/comment. I repushed a fix, that needs to be merged with https://github.com/open-contracting/credere-frontend/pull/116
That said, using an enum for the possible sort orders (and then a dict like in your solution b09d4d015776734867bcfd724eea969314a59c19) is probably better.
Ah, that one was my commit indeed, not sure how it ended up outside a branch
I now added Lender like in your commit and fixed support for the status order.
Why is created_at -> borrower_submitted_at in your commit?
"application.created_at": models.Application.borrower_submitted_at
Your commit is off-branch because I force-pushed before I saw your updates.
Edit: I think this getattr
solution might be fine – one advantage is less code repetition with the frontend.
Edit2: Done for the day. I just came online because I saw the PR was failing :)
Edit: I think this getattr solution might be fine – one advantage is less code repetition with the frontend.
Ok, so it is fine to keep your current approach or should I restore mine? I'm fine either way
Why is created_at -> borrower_submitted_at in your commit?
Because in the front end, it says "submitted date" but I will change it in the front end instead
I've deployed the changes, but had to remove the BorrowerDocument join https://github.com/open-contracting/credere-backend/commit/621f4dce7b6c575c30562283a54304b5cf89c1bc as if an application has more than 1 document it returns duplicates (as the join will give you one result per document). I didn't have more than one document per application in my local database which is why I didn't notice the issue until deploying it in the servers.
Oh right. Probably can restore the joinedload for def get_applications similar to https://github.com/open-contracting/credere-backend/commit/415ea27f0346e34d2371e81bdb9622daa4747667
I've restored the joinedload to avoid N+1 queries (but not the join
, which causes duplicates)
fixes #323