Skip to content

Commit

Permalink
feat(information_management): Ability to link Knowledge Base article …
Browse files Browse the repository at this point in the history
…to an Organization

ref: #426 #427
  • Loading branch information
jon-nfc committed Dec 21, 2024
1 parent cbd1af7 commit 1876963
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/access/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@ def __str__(self):
}
]
},
{
"name": "Knowledge Base",
"slug": "kb_articles",
"sections": [
{
"layout": "table",
"field": "knowledge_base",
}
]
},
{
"name": "Notes",
"slug": "notes",
Expand Down
8 changes: 8 additions & 0 deletions app/access/serializers/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ def get_url(self, item) -> dict:

return {
'_self': item.get_url( request = self._context['view'].request ),
'knowledge_base': reverse(
"v2:_api_v2_model_kb-list",
request=self._context['view'].request,
kwargs={
'model': self.Meta.model._meta.model_name,
'model_pk': item.pk
}
),
'teams': reverse("v2:_api_v2_organization_team-list", request=self._context['view'].request, kwargs={'organization_id': item.pk}),
}

Expand Down

0 comments on commit 1876963

Please sign in to comment.