Skip to content

Commit

Permalink
Merge pull request #47 from urbanriskmap/dev
Browse files Browse the repository at this point in the history
Merge dev branch
  • Loading branch information
tomasholderness authored Jun 19, 2018
2 parents 9f010a5 + 8ca1b9e commit 7ace263
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ CHANGE LOG
- updated Travis tests to use Node v8.9.3 (production)
- updated README.md minimum requirements
- added 'attributes' column to local_areas
- implemented new notification architecture
- implemented new notification architecture
- requires cognicity-server v3.0.6 or later
- handle null instance region codes
2 changes: 1 addition & 1 deletion schema/reports/grasp/grasp.functions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ CREATE OR REPLACE FUNCTION grasp.push_to_all_reports(varchar)
FROM grasp.cards AS cards, grasp.reports AS reports WHERE cards.card_id = cardId::uuid AND reports.card_id = cardId::uuid
RETURNING pkey INTO reportId;

SELECT r.tags->>'instance_region_code', r.lang INTO instanceRegionCode, lang FROM cognicity.all_reports r WHERE r.pkey = reportId;
SELECT COALESCE( NULLIF(r.tags->>'instance_region_code', ''),'null'), r.lang INTO instanceRegionCode, lang FROM cognicity.all_reports r WHERE r.pkey = reportId;
SELECT c.username, c.network INTO username, network FROM grasp.cards c WHERE card_id = cardId::uuid;

RETURN ('{"reportId":' || reportId || ', "instanceRegionCode":"'|| instanceRegionCode ||'", "language":"' || lang || '", "username":"' || username ||'", "network":"' || network ||'"}');
Expand Down

0 comments on commit 7ace263

Please sign in to comment.