Leo Hemsted
d23a92fbc0
Merge pull request #952 from alphagov/international-delivery-receipts
...
update delivery receipts for countries that return them
2017-05-25 13:13:49 +01:00
Leo Hemsted
57b7cb8d24
Merge pull request #986 from alphagov/create-service-bug
...
separate service deserialization from validation
2017-05-25 10:52:38 +01:00
Leo Hemsted
4b8b6ca91e
add test to ensure that updating other things doesnt affect sms sender
2017-05-25 10:37:17 +01:00
Leo Hemsted
554a193cff
separate service deserialization from validation
...
Marshmallow validates and deserialises - BUT, when it deserialises,
it explicitly sets `sms_sender=None`, even when you haven't passed
sms_sender in. This is problematic, because we wanted to take advantage
of sqlalchemy's default value to set sms_sender to `GOVUK` when the
actual DB commit happens.
Instead, still use marshmallow for validating, but manually carry out
the json deserialisation in the model class.
This fixes a bug that only manifested when the database was upgraded,
but the code hadn't updated. 🎉
2017-05-24 16:27:12 +01:00
Imdad Ahad
c986b88e21
Merge pull request #979 from alphagov/imdad-migration-add-normalised-to-notification
...
Add normalised_to field to notification
2017-05-24 16:21:15 +01:00
minglis
8a2715e3e1
Merge pull request #980 from alphagov/change-delete-jobs-to-delete-by-type
...
Change delete jobs to delete by type
2017-05-24 12:35:04 +01:00
Rebecca Law
54f7e732d9
Fix typo
2017-05-23 15:36:33 +01:00
Martyn Inglis
a751637eaa
Added the schedule into celery beat.
...
run the delete jobs 20 mins apart,
00:00 -> sms
00:20 -> email
00:40 -> letters
2017-05-23 13:41:22 +01:00
Martyn Inglis
a5c71ea907
New task to use the new DAO method to delete the data by type
2017-05-23 13:40:36 +01:00
Martyn Inglis
aaa0f763a1
Updated delete notifications over a week old query
...
- PREVIOUS
based on status. so as we add new status we have some orphaned rows, as these delete queries would miss them
- NOW
based on type. In effect they do the same thing, deleting emails, sms or letters older than a week old irrespective of status. Can see is iterating on this to have more granularity say for letters, so split up. Also means that the delete action isn't so big, as we half the affected rows, by doing it by type.
2017-05-23 13:40:15 +01:00
Rebecca Law
6536177ac2
Added the delete query for notifications
2017-05-23 13:35:15 +01:00
Rebecca Law
8a08773cae
Merge branch 'master' into server-command-for-db-update
2017-05-23 13:25:47 +01:00
Leo Hemsted
f899d74325
Merge pull request #973 from alphagov/40604-or-govuk
...
treat 40604 and GOVUK as not having a sender ID
2017-05-23 11:29:33 +01:00
Leo Hemsted
86c9600b04
use config to get default sender rather than hardcoding
...
this means that on non-prod envs, it reflects that environment.
it needs to be a lamdba, because the column object is created at import
time, when current_app.config won't have been loaded - this means that
when you create a Service object, that lambda executes and grabs the
correct default value
2017-05-23 11:12:37 +01:00
Imdad Ahad
24dfcd2128
Add normalised_to field to notification
2017-05-23 10:44:39 +01:00
Ken Tsang
de7ad6fb95
Refactored service_permissions data model
2017-05-22 17:25:58 +01:00
Leo Hemsted
2535a7fe98
set sms_sender to be 'GOVUK' if not otherwise specified
...
this is a precursor to making the column non-nullable
2017-05-22 17:13:35 +01:00
Leo Hemsted
3744463296
treat 40604 and GOVUK as not having a sender ID
...
in prep for removing the 40604-as-default, first we need to make sure
that if you either have GOVUK or None as your sms sender, then we send
GOVUK through to the provider
2017-05-22 17:10:07 +01:00
kentsanggds
f5d3eed7e0
Revert "Refactored service permissisons data model"
2017-05-22 16:05:31 +01:00
kentsanggds
39f23c6189
Merge pull request #969 from alphagov/ken-refactor-service_permissions-data_model
...
Refactored service permissisons data model
2017-05-22 14:08:15 +01:00
Ken Tsang
052004bef0
Refactored data model to remove cascade
2017-05-22 13:33:43 +01:00
Ken Tsang
28ef9a1853
Refactored service permissisons data model
2017-05-22 10:58:41 +01:00
Imdad Ahad
02db3be37c
General refactor
2017-05-22 10:12:18 +01:00
Rebecca Law
2e864411af
Create a server command to run custom db scripts.
2017-05-19 17:04:39 +01:00
Imdad Ahad
0e0c18583f
Fix test data and how we parse the JSON
2017-05-19 10:16:48 +01:00
minglis
da6a6f6641
Merge pull request #959 from alphagov/comma-format-message-limit
...
Comma-format number when emailing live services
2017-05-18 11:06:24 +01:00
Martyn Inglis
8dc7a86148
Merge branch 'master' into async-job-stats
...
Conflicts:
app/dao/services_dao.py
2017-05-18 09:34:54 +01:00
kentsanggds
7850781245
Merge pull request #961 from alphagov/ken-default-permissions-when-creating-service
...
Ken default permissions when creating service
2017-05-17 16:49:25 +01:00
Ken Tsang
54446d5f4d
Add default permissions when creating a service
2017-05-17 14:18:12 +01:00
Martyn Inglis
ee5bb5f01a
Fixed issues caused by single evaluation of method signature defaults
2017-05-17 13:27:05 +01:00
Martyn Inglis
09f45332eb
Fixed issues caused by single evaluation of method signature defaults
2017-05-17 13:25:40 +01:00
minglis
05a179c6ef
Merge pull request #941 from alphagov/load-service-on-auth
...
Load service on auth
2017-05-17 10:49:00 +01:00
Martyn Inglis
83a1b1526e
Merge branch 'master' into async-job-stats
...
Conflicts:
app/notifications/notifications_ses_callback.py
2017-05-17 09:49:43 +01:00
kentsanggds
c4964d8cf4
Merge pull request #956 from alphagov/add-service-permissions
...
Add service permissions DAO and refactor user service permission mock
2017-05-16 14:26:15 +01:00
Martyn Inglis
d2a7a7b3c9
Fixed error in code
2017-05-16 13:55:32 +01:00
Martyn Inglis
1dc3970595
Code tidy up as be @imdad comments.
2017-05-16 12:55:12 +01:00
Martyn Inglis
a5dae0bebd
Fixed test - I had deliberately failed the test as part of debugging and not fixed the assert. Doh.
2017-05-16 12:49:20 +01:00
Ken Tsang
733c16b2bb
Update to strip down DAO and clarify tests
2017-05-16 12:33:27 +01:00
Chris Hill-Scott
2d4f10bd22
Comma-format number when emailing live services
...
250,000 is easier to read than 250000.
2017-05-16 12:33:01 +01:00
Ken Tsang
54d801979c
Refactored to handle single service permission
2017-05-16 10:57:57 +01:00
Imdad Ahad
e6db9ffc1b
Force parse JSON received from SNS:
...
* An SNS callback containing JSON has a plaintext header set. Using
* request.get_json() will return None if the header is not
* application/json unless the force parameter is set to True
2017-05-16 10:29:27 +01:00
Imdad Ahad
98aeb9f9da
Merge pull request #951 from alphagov/imdad-feat-auto-send-email-live-service
...
Send a welcome email to newly live services
2017-05-15 17:39:38 +01:00
Ken Tsang
114d4d84d4
Add service permissions DAO and refactor user service permission mock
2017-05-15 17:28:14 +01:00
Imdad Ahad
54cedf39e7
Merge pull request #954 from alphagov/imdad-feat-process-dvla-sns-callback
...
Add callback to process DVLA response file
2017-05-15 16:23:43 +01:00
Imdad Ahad
d993e1a43e
Don't send notification if other service attrs changed
2017-05-15 15:02:01 +01:00
Ken Tsang
380bc22f22
Add relationship for service in ServicePermission
2017-05-15 13:44:52 +01:00
Ken Tsang
359c4d2138
add service permissions model + migration script
2017-05-15 12:52:28 +01:00
Imdad Ahad
4003edfa67
Add DVLA callback:
...
* Process SNS callback, trigger the update notifications celery task
* Put autoconfirm into its own method and use in callbacks
2017-05-15 11:12:31 +01:00
Imdad Ahad
ee484ec368
Add get_s3_file method for use in DVLA processing
2017-05-15 10:48:37 +01:00
Imdad Ahad
7a10a91262
Revert "Process SNS request triggered by a DVLA S3 update"
2017-05-12 17:21:07 +01:00