Skip to content

Commit 37535f6

Browse files
committed
update WNM publish to update oneOf canonical, update, deletion
1 parent 0a1b318 commit 37535f6

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

pywis_pubsub/publish.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def create_message(topic: str, content_type: str, url: str, identifier: str,
161161
},
162162
},
163163
'links': [{
164-
'rel': 'canonical',
164+
'rel': LINK_TYPES[operation],
165165
'type': content_type2,
166166
'href': url,
167167
'length': file_info['size']
@@ -176,14 +176,6 @@ def create_message(topic: str, content_type: str, url: str, identifier: str,
176176
LOGGER.debug('Setting time instant')
177177
message['properties']['datetime'] = datetime_
178178

179-
if operation != 'create':
180-
message['links'].append({
181-
'rel': LINK_TYPES[operation],
182-
'type': content_type2,
183-
'href': url,
184-
'length': file_info['size']
185-
})
186-
187179
if file_info.get('data') is not None and inline:
188180
LOGGER.debug('Including data inline via properties.content')
189181
message['properties']['content'] = {

0 commit comments

Comments
 (0)