Commit Graph

3155 Commits

Author SHA1 Message Date
Leo Hemsted
075d2a3346 tighten key_type validation on letters api
when in research mode or test key, dont send letters via api - instead,
just put them straight to success state

when using a team key, flat out reject the request (403)
2017-08-01 15:49:00 +01:00
Leo Hemsted
76ea0dbc76 Merge branch 'master' of github.com:alphagov/notifications-api into letter-api 2017-07-31 18:15:16 +01:00
Leo Hemsted
20f3be0bae Merge pull request #1140 from alphagov/credstash
Remove credstash without breaking celery
2017-07-31 14:15:44 +01:00
Leo Hemsted
3cb3cf438e remove SEND_COMBINED 2017-07-31 13:29:30 +01:00
Leo Hemsted
b5dc7642aa remove aws_run_celery file
it's no longer relevant since the switch to PaaS
2017-07-31 11:12:43 +01:00
Leo Hemsted
9c212e78af Revert "Revert "remove credstash""
This reverts commit de41fde0d3.
2017-07-31 11:11:00 +01:00
Leo Hemsted
8e738b783e update test_send_notification to account for new uuid mock 2017-07-31 11:10:05 +01:00
Sakis
cce8ef1c50 Merge pull request #1139 from alphagov/revert-credstash-removal
Revert "remove credstash"
2017-07-28 16:21:00 +01:00
Athanasios Voutsadakis
de41fde0d3 Revert "remove credstash"
This reverts commit 7db1bfbb77.
2017-07-28 16:09:49 +01:00
Leo Hemsted
6c007fb27d Merge pull request #1127 from alphagov/credstash
remove credstash
2017-07-28 10:47:55 +01:00
Leo Hemsted
11f8603319 Remove custom error message from personalisation validation
There's no longer a single err msg that fits all problems with
personalisation - since letters expect specific fields there
2017-07-27 16:49:37 +01:00
Leo Hemsted
2ab105aaf4 add tests for letter api notifications 2017-07-27 16:43:55 +01:00
Leo Hemsted
f528236eda make job.created_by nullable
Since letter jobs from the API aren't created by any single individual,
lets make created_by nullable. Note: We'll have to make sure that we
update the admin app to handle these jobs nicely
2017-07-27 12:58:13 +01:00
kentsanggds
2df411a985 Merge pull request #1131 from alphagov/ken-update-email-logo-use-cdn
Update email logo to use logo CDN
2017-07-27 11:50:00 +01:00
Leo Hemsted
11458c421b ensure permissions are correct in sample letter fixtures
sample_letter_* should always include a service that has letter
permissions.

Also, print out the JSON response in the admin_request fixture if the
response code doesn't match
2017-07-27 11:12:09 +01:00
Leo Hemsted
2746bf0318 process letters from api traffic
there are three steps to this

1. Create a job
  * Starts in status 'ready to send'
  * Created by None, since it's from the API
  * original file name 'letter submitted via api'
2. Create a single notification for that job
  * job_row_number 0
  * client reference if provided
  * address line 1 as recipient
3. Trigger the build_dvla_file task
  we know that all the notifications have been created for this job
  (since we just created them ourselves synchronously), so this will
  just create the dvla-format file for the job, and upload it to s3.
2017-07-27 11:12:09 +01:00
Imdad Ahad
3d089bf7f1 Merge pull request #1133 from alphagov/fix-build
Don't drop the columns yet
2017-07-26 15:26:12 +01:00
Rebecca Law
8b6be67bbd make columns nullable 2017-07-26 15:06:09 +01:00
Rebecca Law
5669d0475f Don't drop the columns yet 2017-07-26 14:46:40 +01:00
Rebecca Law
90ef82ef92 Merge pull request #1132 from alphagov/update-updated_at
Removed month and year and replaced it with start_date and end_date.
2017-07-26 13:50:52 +01:00
Rebecca Law
c1f2634c90 Removed month and year and replaced it with start_date and end_date.
This will allow us to sort the data properly.
2017-07-26 13:19:17 +01:00
Ken Tsang
0daf88aff7 Refactored code 2017-07-26 11:05:31 +01:00
Ken Tsang
3e6e75998b Update config to use logo cdn 2017-07-26 11:05:31 +01:00
Rebecca Law
3878ece9ea Merge pull request #1129 from alphagov/use-bst-for-month
Use BST to calculate monthly billing
2017-07-26 09:56:15 +01:00
Rebecca Law
92c441656b Use the right date for the method 2017-07-26 09:44:20 +01:00
Rebecca Law
0a7890f069 Use the right date for the billing month. 2017-07-26 09:43:25 +01:00
Rebecca Law
9c55fa7f34 Use the end date for the month, when we are in BST the first day of the month is an hour behind and in the previous month. 2017-07-25 18:08:46 +01:00
Venus Bailey
6f7255f2dd Merge pull request #1128 from alphagov/http-custom-header
Http custom header
2017-07-25 17:55:41 +01:00
Rebecca Law
f73b5140ed Bah! style check 2017-07-25 17:47:08 +01:00
Rebecca Law
b62ee8380c Use BST to calculate monthly billing 2017-07-25 17:38:53 +01:00
kentsanggds
315ed3307c Merge pull request #1097 from alphagov/ken-db-drop-old-service-flags
Database update - drop redundant service flags
2017-07-25 17:25:15 +01:00
Ken Tsang
4989493bdf Renamed migration script 2017-07-25 17:23:30 +01:00
Ken Tsang
277f5b9053 Renamed script 2017-07-25 17:20:35 +01:00
Ken Tsang
beca03a39c Add migration script to drop service flags 2017-07-25 17:20:35 +01:00
venusbb
9da5682c70 Experiment with logging a custom request header 2017-07-25 17:17:06 +01:00
venusbb
fb601daedc Merge branch 'master' of https://github.com/alphagov/notifications-api into sms_whitelist 2017-07-25 17:14:59 +01:00
Rebecca Law
3d3703750c Merge pull request #1126 from alphagov/month-billing-table
Add transactional for new query
2017-07-25 16:07:53 +01:00
Rebecca Law
e23d38de26 Fix bug in get rates function. 2017-07-25 15:50:14 +01:00
Leo Hemsted
0ce9b94c36 Merge pull request #1075 from alphagov/letter-api-refactor
Letter api step 1 - refactor
2017-07-25 14:53:39 +01:00
Leo Hemsted
7db1bfbb77 remove credstash 2017-07-25 14:45:59 +01:00
Rebecca Law
5612ca023e - Add transactional
- Rename function for clarity
2017-07-25 14:26:42 +01:00
Leo Hemsted
8c7127da3b Merge pull request #1125 from alphagov/pyup
bump test requirements
2017-07-25 12:04:12 +01:00
Rebecca Law
48c02ba31f Merge pull request #1091 from alphagov/month-billing-table
Month billing table
2017-07-25 12:03:40 +01:00
Rebecca Law
d2a1da9ea6 Removed comment 2017-07-25 11:44:39 +01:00
Rebecca Law
eaf5cbb868 Add labels to query so that the named tuples can be referenced later.
Remove unnecessary function
2017-07-25 11:43:41 +01:00
Leo Hemsted
cc32cff32a bump test requirements
also ignore celery improvements
2017-07-25 11:40:12 +01:00
Imdad Ahad
dafab0201a Merge pull request #1096 from alphagov/imdad-feat-remove-unused-wheels-deployment
Remove wheels-ing on deployment
2017-07-25 11:14:01 +01:00
Rebecca Law
91f29517eb Merge branch 'master' into month-billing-table 2017-07-24 15:17:36 +01:00
Rebecca Law
3e2b8190b9 - Added a scheduled task to create or update billing for the month, yesterday is used to calculate the start and end date for the month.
- The new task has not been added to the beat application yet.
- Added an updated_at column to the monthly billing table, we may want to only calculate from the last updated date rather than the entire month.
2017-07-24 15:13:18 +01:00
Leo Hemsted
6059dcfe11 Merge pull request #1093 from alphagov/queue-split-part-2
[2/3] send to new queues
2017-07-24 15:11:37 +01:00