Skip to content

Commit

Permalink
Fix assessment parent object import
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Aufart <[email protected]>
  • Loading branch information
aufi committed Mar 19, 2024
1 parent afc2462 commit 1be4cb4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion hack/tool/tackle
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,15 @@ class TackleTool:
dictObj['password'] = self.decrypt(dictObj['password'])
dictObj['settings'] = self.decrypt(dictObj['settings'])

path = tackle2path(t)
if "assessments" in t:
if 'application' in dictObj:
path = tackle2path("applications/%d/assessments" % dictObj['application']['id'])
elif 'archetype' in dictObj:
path = tackle2path("archetypes/%d/assessments" % dictObj['archetype']['id'])
debugPrint(dictObj)
apiJSON(self.tackle2Url + tackle2path(t), self.tackle2Token, dictObj, method='POST', ignoreErrors=ignoreErrors)
apiJSON(self.tackle2Url + path, self.tackle2Token, dictObj, method='POST', ignoreErrors=ignoreErrors)


# Migrate Pathfinder Assessment to Konveyor (expecting Pathfinder hard-coded questionnaire ID=1)
def migrateAssessments(self, pathfinderUrl, ignoreErrors=False):
Expand Down

0 comments on commit 1be4cb4

Please sign in to comment.