Commit Graph

4623 Commits

Author SHA1 Message Date
Rebecca Law
6f488bf7c7 Reduce logging level
If the organisation name that is being inserted or updated is not unique we just want to return a 400 to the admin app.
Updated the code so that we are not logging.exception, this is because a cloud watch alert is set to the support team. This type of error is not something we need to investigate.
2018-02-14 14:35:40 +00:00
Leo Hemsted
15c2a9461e Merge pull request #1658 from alphagov/pyup-update-boto3-1.5.27-to-1.5.28
Update boto3 to 1.5.28
2018-02-14 11:48:35 +00:00
Leo Hemsted
10ebf4ae02 Merge pull request #1659 from alphagov/pyup-update-awscli-1.14.37-to-1.14.38
Update awscli to 1.14.38
2018-02-14 11:48:21 +00:00
Leo Hemsted
4d7a0acaf2 Merge pull request #1662 from alphagov/leohemsted-patch-1
Update requirements.txt
2018-02-14 11:48:10 +00:00
Leo Hemsted
f070b4eab1 Update requirements.txt
email validation
2018-02-14 11:31:17 +00:00
Katie Smith
2049e75210 Merge pull request #1656 from alphagov/let-service-change-punctuation-in-name
Allow services to add punctuation to or change the case of their name
2018-02-14 10:22:41 +00:00
Katie Smith
e1cc8175d7 Allow services to add puntuation to or change the case of their name
Changed the '/service/unique' endpoint to optionally accept the
service_id parameter. It now doesn't matter if a user tries to change
the capitalization or add punctuation to their own service name. But
there should still be an error if a user tries to change the punctuation
or capitalization of another service.

service_id needs to be allowed to be None until notifications-admin is
updated to always pass in the service_id.
2018-02-14 10:11:46 +00:00
pyup-bot
a6cf634ab6 Update awscli from 1.14.37 to 1.14.38 2018-02-13 23:25:22 +00:00
pyup-bot
ea13919190 Update boto3 from 1.5.27 to 1.5.28 2018-02-13 23:25:18 +00:00
kentsanggds
16c78a8924 Merge pull request #1649 from alphagov/ken-link-service-org
Link service to organisation
2018-02-13 16:46:49 +00:00
Ken Tsang
f09bcf5ed9 Refactored organisation dao test 2018-02-13 16:38:35 +00:00
Ken Tsang
4576bdd64f Reraise integrity errors on org name unique contraints as 400
- currently being raised as 500s, but should really be 400s as the request data has the duplicate name
2018-02-13 14:47:03 +00:00
Ken Tsang
d80c7d4f65 Return services serialized for dashboard for orgs
- rather than returning the entire service, return only whats needed when listing the service on the org dashboard
2018-02-13 14:06:43 +00:00
Ken Tsang
085110417f Refactor organisation_dao 2018-02-13 14:06:43 +00:00
Ken Tsang
44f9143d08 Organisation services API endpoints 2018-02-13 14:06:43 +00:00
Ken Tsang
60f96ab598 Organisation service DAO 2018-02-13 14:06:43 +00:00
Ken Tsang
6e0e3e9f08 Migration script to add organisation_to_service association table 2018-02-13 14:06:43 +00:00
Ken Tsang
a035dcf7b0 Add organisation_to_service association table
- moved Organisation so that Service model has access to it
2018-02-13 14:06:43 +00:00
Richard Chapman
362dcb9636 Merge pull request #1654 from alphagov/pyup-update-awscli-1.14.32-to-1.14.37
Update awscli to 1.14.37
2018-02-13 12:19:27 +00:00
Richard Chapman
0aa2a36f6b Merge pull request #1653 from alphagov/pyup-update-boto3-1.5.22-to-1.5.27
Update boto3 to 1.5.27
2018-02-13 12:19:11 +00:00
Richard Chapman
ca38c47ac0 Merge pull request #1652 from alphagov/rc_fixed_failing_test
Added a freezetime to the test test_create_letters_pdf_calls_s3upload
2018-02-13 12:18:59 +00:00
Richard Chapman
ad8928370c Merge pull request #1638 from alphagov/pyup-update-psycopg2-2.7.3.2-to-2.7.4
Update psycopg2 to 2.7.4
2018-02-13 12:18:39 +00:00
pyup-bot
a56849aee5 Update awscli from 1.14.32 to 1.14.37 2018-02-13 01:10:33 +00:00
pyup-bot
da12acab36 Update boto3 from 1.5.22 to 1.5.27 2018-02-13 01:10:24 +00:00
Richard Chapman
da669e46f0 Import of time was not needed - removed 2018-02-12 17:08:10 +00:00
Richard Chapman
d2f4f544c1 Added a freezetime to the test test_create_letters_pdf_calls_s3upload
as it failed on prodction and I managed to get it to fail locally

{'file_location': '2018-02-12/NOTIFY.FOO.D.2.C.N.20180212164427.PDF'}
!= {'file_location': '2018-02-12/NOTIFY.FOO.D.2.C.N.20180212164428.PDF'}

A freeze time till ensure that the finame which is based on the time
will not fail.
2018-02-12 16:55:15 +00:00
Leo Hemsted
376ebc5025 Merge pull request #1650 from alphagov/fix
fix bug where we s3upload crashed if you didn't supply tags
2018-02-12 16:12:05 +00:00
Leo Hemsted
24fab13d8a fix bug where we s3upload crashed if you didn't supply tags 2018-02-12 15:50:05 +00:00
Leo Hemsted
1ef6718918 Merge pull request #1646 from alphagov/add-tags-to-pdf-letters
upload letter pdfs with retention tag
2018-02-12 15:03:53 +00:00
Katie Smith
5eee0cf78b Merge pull request #1639 from alphagov/create-new-organisation-model
Create new organisation model
2018-02-12 12:02:58 +00:00
Leo Hemsted
093e8083e0 upload letter pdfs with retention tag
so we can delete them automatically with s3's lifecycle policy
2018-02-09 17:13:37 +00:00
Chris Hill-Scott
daaa390990 Merge pull request #1645 from alphagov/email-auth-domain
Allow admin to specify domain for email auth links
2018-02-09 16:31:41 +00:00
Leo Hemsted
cc9bea17d1 Merge pull request #1619 from alphagov/pyup-update-notifications-python-client-4.7.1-to-4.7.2
Update notifications-python-client to 4.7.2
2018-02-09 14:58:59 +00:00
Leo Hemsted
90da7f53b4 Merge pull request #1636 from alphagov/get-rid-of-error-logging
downgrade lots of routine logging from error/exception to info
2018-02-09 14:58:46 +00:00
Leo Hemsted
3776551334 Merge pull request #1640 from alphagov/rc_update_celery_log_essage
Fixed typo in log call so that the name of the task is returned
2018-02-09 14:58:29 +00:00
Chris Hill-Scott
c0e2a478f6 Allow admin to specify domain for email auth links
Similar to https://github.com/alphagov/notifications-api/pull/1515

This lets the admin app pass in a domain to use for email auth links,
so that when it’s running on a different URL users who try to sign in
will get an email auth link for the domain they sign in on, not the
default admin domain for the environment in which the API is running.
2018-02-09 14:19:17 +00:00
Rebecca Law
690a9c3022 Merge pull request #1644 from alphagov/separate-worker-for-service-callbacks
Fix copy/paste error
2018-02-09 13:45:44 +00:00
Rebecca Law
780666163e Fix copy/paste error 2018-02-09 13:33:34 +00:00
Rebecca Law
bb027a5d8c Merge pull request #1643 from alphagov/separate-worker-for-service-callbacks
New worker for service-callbacks
2018-02-09 13:23:01 +00:00
Katie Smith
4a14225d04 Change Organisation DAO update method
- Changed the organisation DAO update method to only make 1 query
- Updated the update rest endpoint to not return an organisation when
the update is successful
2018-02-09 11:17:13 +00:00
Rebecca Law
f7ab04a8f8 When there are high volumes of emails being processed the SES callback task will trigger the service-callback task.
This PR creates a new worker to deal with the service-callback so that one event doesn't block the other.
2018-02-09 09:39:14 +00:00
Richard Chapman
d4b851b5b0 Removed the line altogther as it was not needed 2018-02-08 17:56:14 +00:00
Richard Chapman
bb15ed0d01 Commited by mistake - changed the log level back to INFO 2018-02-08 17:55:01 +00:00
Richard Chapman
632364633b Fixed typo in call, should be self.name not Task.name.
Task.name always returned None.
2018-02-08 17:47:59 +00:00
Rebecca Law
8aa829e93a Merge pull request #1622 from alphagov/reduce-logging
Reducing the logging for the life cycle of a notification
2018-02-08 16:57:21 +00:00
pyup-bot
7edaa8dc51 Update psycopg2 from 2.7.3.2 to 2.7.4 2018-02-08 15:37:12 +00:00
Katie Smith
269923ba28 Add Organisations endpoints
As part of this we also needed to add:
- schemas for validation
- serialize method for Organisation model
2018-02-08 15:22:21 +00:00
Katie Smith
6a79eedbce Add Organisation DAO 2018-02-08 14:44:40 +00:00
Katie Smith
d40d520d2c Add Organisation model and migration
Now that we have renamed the 'old' organisation model to email_branding,
we can create a new organisation model.
2018-02-08 14:39:25 +00:00
Leo Hemsted
08c35b3c72 downgrade lots of routine logging from error/exception to info
most of them are 400s for badly inputted phone numbers etc
2018-02-08 13:38:32 +00:00