Skip to content

Commit

Permalink
fix AAP Image modification date is now rubbish
Browse files Browse the repository at this point in the history
  • Loading branch information
marwoodandrew committed Apr 29, 2024
1 parent 1bf3885 commit d8af196
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion server/aap_mm/aap_mm_datalayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def _parse_doc(self, doc):
new_doc['original_source'] = doc['Credit'] + '/' + str(doc.get('Source', ''))
else:
new_doc['original_source'] = doc['Credit']
new_doc['versioncreated'] = self._datetime(doc['ModifiedDate'])
new_doc['versioncreated'] = self._datetime(doc['CreationDate'])
new_doc['firstcreated'] = self._datetime(doc['CreationDate'])
new_doc['pubstatus'] = 'usable'
# This must match the action
Expand Down
2 changes: 1 addition & 1 deletion server/features/aap_mm.feature
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Feature: AAP Multimedia Feature
"operation": "fetch",
"sign_off": "abc",
"byline": "Julian Smith/AAP PHOTOS",
"firstcreated": "2015-03-29T08:49:44+0000"
"firstcreated": "2015-03-29T11:42:29+0000"
}
]}
"""
Expand Down
22 changes: 11 additions & 11 deletions server/features/sms_report.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Feature: SMS Report
Then we get list with 1 items
"""
{"_items": [{
"start_epoch": 1530226800000,
"start_epoch": 1530223200000,
"interval": 86400000,
"with_sms": [0, 1, 1],
"without_sms": [1, 1, 0]
Expand Down Expand Up @@ -71,14 +71,14 @@ Feature: SMS Report
"type": "column",
"xAxis": 0,
"data": [0, 1, 1],
"pointStart": 1530226800000,
"pointStart": 1530223200000,
"pointInterval": 86400000
}, {
"name": "Without SMS",
"type": "column",
"xAxis": 0,
"data": [1, 1, 0],
"pointStart": 1530226800000,
"pointStart": 1530223200000,
"pointInterval": 86400000
}]
}]
Expand Down Expand Up @@ -106,7 +106,7 @@ Feature: SMS Report
Then we get list with 1 items
"""
{"_items": [{
"start_epoch": 1530313200000,
"start_epoch": 1530309600000,
"interval": 3600000,
"with_sms": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
"without_sms": [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Expand Down Expand Up @@ -155,15 +155,15 @@ Feature: SMS Report
"name": "With SMS",
"type": "column",
"xAxis": 0,
"data": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
"pointStart": 1530313200000,
"data": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0],
"pointStart": 1530309600000,
"pointInterval": 3600000
}, {
"name": "Without SMS",
"type": "column",
"xAxis": 0,
"data": [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"pointStart": 1530313200000,
"data": [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"pointStart": 1530309600000,
"pointInterval": 3600000
}]
}]
Expand Down Expand Up @@ -194,7 +194,7 @@ Feature: SMS Report
Then we get list with 1 items
"""
{"_items": [{
"start_epoch": 1529190000000,
"start_epoch": 1529186400000,
"interval": 604800000,
"with_sms": [1, 2],
"without_sms": [1, 1]
Expand Down Expand Up @@ -247,14 +247,14 @@ Feature: SMS Report
"type": "column",
"xAxis": 0,
"data": [1, 2],
"pointStart": 1529190000000,
"pointStart": 1529186400000,
"pointInterval": 604800000
}, {
"name": "Without SMS",
"type": "column",
"xAxis": 0,
"data": [1, 1],
"pointStart": 1529190000000,
"pointStart": 1529186400000,
"pointInterval": 604800000
}]
}]
Expand Down
4 changes: 2 additions & 2 deletions server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def env(variable, fallback_value=None):
AAP_MM_SEARCH_MEDIA_TYPES = ['image']

# The URL endpoint for the images API
AAP_MM_SEARCH_URL = env('AAP_MM_SEARCH_URL', 'https://photos-api.aap.com.au/api/v3')
AAP_MM_SEARCH_URL = env('AAP_MM_SEARCH_URL', 'https://photos-api-prod.aap.com.au/api/v3')
# Partial URL for the video preview
AAP_MM_CDN_URL = env('AAP_MM_CDN_URL', 'https://photos-cdn.aap.com.au/Preview.mp4')

Expand Down Expand Up @@ -339,7 +339,7 @@ def env(variable, fallback_value=None):
DC_URL = env('DC_URL', '')
DC_USERNAME = env('DC_USERNAME', '')
DC_PASSWORD = env('DC_PASSWORD', '')
DC_SEARCH_FIELD = env('DC_SEARCH_FIELD', 'ORIGINALTRANSMISSIONREFERENCE')
DC_SEARCH_FIELD = env('DC_SEARCH_FIELD', 'OriginalTransmissionReference')
PLANNING_ACCEPT_ASSIGNMENT_EMAIL = env('PLANNING_ACCEPT_ASSIGNMENT_EMAIL', _MAIL_FROM)

EMBED_PRODUCT_FILTERING = strtobool(env('EMBED_PRODUCT_FILTERING', 'true'))
Expand Down

0 comments on commit d8af196

Please sign in to comment.