Skip to content

Commit

Permalink
fix: update certificates api_client data structure
Browse files Browse the repository at this point in the history
Previous structure was an outdated example, this implements the new structure and allow to set the metadata by settings
  • Loading branch information
andrey-canon committed Aug 10, 2023
1 parent 7e9629b commit 384cb4b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions eox_nelp/api_clients/certificates.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ def create_external_certificate(self, certificate_data):
},
"group_code": certificate_data["group_code"],
"certificate_type": "completion", # What types do we have ?
"metadata": {
"degree": certificate_data["grade"],
"FAIL": not certificate_data["is_passing"],
}
"score": {
"value": certificate_data["grade"],
"type": "percentage"
},
"metadata": getattr(settings, "EXTERNAL_CERTIFICATES_METADATA", {}),
}

return self.make_post(path, payload)

0 comments on commit 384cb4b

Please sign in to comment.