Skip to content

Commit 8bfabe9

Browse files
update: hardcoded is_archive
1 parent 1b40a9f commit 8bfabe9

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

hrflow/hrflow/job/storing.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def get(self, board_key, key=None, reference=None):
168168
response = self.client.get("job/indexing", query_params)
169169
return validate_response(response)
170170

171-
def archive(self, board_key, key=None, reference=None, is_archive=1):
171+
def archive(self, board_key, key=None, reference=None):
172172
"""
173173
This method allows to archive (is_archive=1) or unarchive (is_archive=0) a job
174174
in HrFlow.ai.
@@ -182,16 +182,13 @@ def archive(self, board_key, key=None, reference=None, is_archive=1):
182182
job identifier (key)
183183
reference: <string>
184184
job identifier (reference)
185-
is_archive: <integer>
186-
default = 1
187-
{0, 1} to indicate archive/unarchive action
188185
189186
Returns
190187
Archive/unarchive job response
191188
192189
"""
193190
payload = format_item_payload("job", board_key, key, reference)
194-
payload["is_archive"] = is_archive
191+
payload["is_archive"] = 1
195192
response = self.client.patch("job/indexing/archive", json=payload)
196193
return validate_response(response)
197194

hrflow/hrflow/profile/storing.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def get(self, source_key, key=None, reference=None):
218218
response = self.client.get("profile/indexing", query_params)
219219
return validate_response(response)
220220

221-
def archive(self, source_key, key=None, reference=None, is_archive=1, email=None):
221+
def archive(self, source_key, key=None, reference=None, email=None):
222222
"""
223223
This method allows to archive (is_archive=1) or unarchive (is_archive=0) a
224224
profile in HrFlow.ai.
@@ -232,9 +232,6 @@ def archive(self, source_key, key=None, reference=None, is_archive=1, email=None
232232
profile identifier (key)
233233
reference: <string>
234234
profile identifier (reference)
235-
is_archive: <integer>
236-
default = 1
237-
{0, 1} to indicate archive/unarchive action
238235
email: <string>
239236
profile_email
240237
@@ -244,7 +241,7 @@ def archive(self, source_key, key=None, reference=None, is_archive=1, email=None
244241
"""
245242

246243
payload = format_item_payload("profile", source_key, key, reference, email)
247-
payload["is_archive"] = is_archive
244+
payload["is_archive"] = 1
248245
response = self.client.patch("profile/indexing/archive", json=payload)
249246
return validate_response(response)
250247

0 commit comments

Comments
 (0)