Merge lp://staging/~ricardokirkner/django-pgtools/check-exists-before-grant into lp://staging/django-pgtools

Proposed by Ricardo Kirkner
Status: Merged
Approved by: Matias Bordese
Approved revision: 8
Merged at revision: 7
Proposed branch: lp://staging/~ricardokirkner/django-pgtools/check-exists-before-grant
Merge into: lp://staging/django-pgtools
Diff against target: 87 lines (+40/-5)
2 files modified
pgtools/management/commands/grantuser.py (+14/-4)
pgtools/tests.py (+26/-1)
To merge this branch: bzr merge lp://staging/~ricardokirkner/django-pgtools/check-exists-before-grant
Reviewer Review Type Date Requested Status
Matias Bordese (community) Approve
Review via email: mp+149932@code.staging.launchpad.net

Commit message

Before requesting a GRANT operation, make sure the relation actually exists, to avoid causing errors on the cursor.

Description of the change

Before requesting a GRANT operation, make sure the relation actually exists, to avoid causing errors on the cursor.

This aims specifically at fixing the issue as seen on https://pastebin.canonical.com/85297/

To post a comment you must log in.
8. By Ricardo Kirkner

fixed review comments

- styling issue
- added test to verify result without mocking cursor.fetchone

Revision history for this message
Matias Bordese (matiasb) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches