Skip to content

Commit

Permalink
fix: add missing return value
Browse files Browse the repository at this point in the history
  • Loading branch information
philnagel committed Jan 30, 2024
1 parent 1542c4d commit 1387069
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion restapi/_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
BASE_PATTERN = 'http*://*/rest/services*'
PORTAL_BASE_PATTERN = 'http*://*/sharing/rest*'
PORTAL_SERVICES_PATTERN = 'http*://*/sharing/servers/*/rest/services/*'
VERSION = '2.4.6'
VERSION = '2.4.7'
PACKAGE_NAME = 'restapi'
USER_AGENT = '{}/{} (Python)'.format(PACKAGE_NAME, VERSION)
GET = 'GET'
Expand Down
11 changes: 6 additions & 5 deletions restapi/common_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -3291,11 +3291,11 @@ def addAttachment(self, oid, attachment, content_type='', gdbVersion=''):
params['uploadId'] = upload_id
try:
attachment_result = self.__edit_handler(self.request(att_url, params, cookies=self._cookie, method=POST), oid)
parent_service.delete_registered_upload(upload_id)
return attachment_result
except:
raise
finally:
parent_service.delete_registered_upload(upload_id)

raise
else:
raise NotImplementedError('FeatureLayer "{}" does not support attachments!'.format(self.name))

Expand Down Expand Up @@ -3380,10 +3380,11 @@ def updateAttachment(self, oid, attachmentId, attachment, content_type='', gdbVe
params['uploadId'] = upload_id
try:
attachment_result = self.__edit_handler(self.request(att_url, params, cookies=self._cookie, method=POST), oid)
parent_service.delete_registered_upload(upload_id)
return attachment_result
except:
raise
finally:
parent_service.delete_registered_upload(upload_id)
raise

else:
raise NotImplementedError('FeatureLayer "{}" does not support attachments!'.format(self.name))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
name = 'bmi-arcgis-restapi'

setup(name=name,
version='2.4.6',
version='2.4.7',
description='Package for working with ArcGIS REST API',
author='Caleb Mackey',
author_email='[email protected]',
Expand Down

0 comments on commit 1387069

Please sign in to comment.