Skip to content

Commit

Permalink
Fixes #1066
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Nov 20, 2023
1 parent c58c05b commit ee2bc50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/api/plsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ def internal_sync():
rs = conn.execute(
text("SELECT id, identifier, name, short_name, global_urn, organisation_id, status, description, "
"uuid4, website_url from collaborations"))
sbs_url_prefix = f"{current_app.app_config.base_url}/collaborations/"
collaborations = [
{"id": row[0], "identifier": row[1], "name": row[2], "short_name": row[3], "global_urn": row[4],
'organisation_id': row[5], "status": row[6], "description": row[7],
"logo": logo_url("collaborations", row[8]), "website_url": row[9]} for row in rs]
"logo": logo_url("collaborations", row[8]), "website_url": row[9],
"sbs_url": f"{sbs_url_prefix}{row[1]}"} for row in rs]
rs = conn.execute(
text("SELECT id, name, short_name, global_urn, identifier, collaboration_id, description FROM `groups`"))
groups = [
Expand Down
2 changes: 2 additions & 0 deletions server/test/api/test_plsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ def assert_sync_result(self, res):
self.assertEqual("active", ai_computing["status"])
self.assertEqual("active", ai_computing["collaboration_memberships"][0]["status"])
self.assertEqual("https://www.google.nl", ai_computing["website_url"])
self.assertEqual(f"http://localhost:3000/collaborations/{ai_computing['identifier']}",
ai_computing["sbs_url"])
self.assertListEqual(["tag_uuc"], ai_computing["tags"])
logo = ai_computing["logo"]
self.assertTrue(logo.startswith("http://localhost:8080/api/images/collaborations/"))
Expand Down

0 comments on commit ee2bc50

Please sign in to comment.