Skip to content

Commit

Permalink
tried to fix issue in adding default apps
Browse files Browse the repository at this point in the history
  • Loading branch information
vsumit89 committed Sep 5, 2022
1 parent 946a98d commit d1ef1b7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion server/action/organisation/application/addDefault.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ func addDefault(w http.ResponseWriter, r *http.Request) {
errorx.Render(w, errorx.Parser(errorx.DBError()))
return
}
newOrganisations := append(app.Organisations, *org)
newOrganisations := make([]model.Organisation, 0)
newOrganisations = append(app.Organisations, *org)
err = tx.Model(&app).Association("Organisations").Replace(&newOrganisations)
if err != nil {
tx.Rollback()
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/application/components/ApplicationType.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const ApplicationType = () => {
<SettingsCard
icon={<CloudDownloadOutlined style={{ color: '#4E89FF' }} />}
title="Default Applications"
description="In this section you can add applications to your organisation which are managed by the admin."
description="In this section you can add and delete applications to your organisation which are managed by the admin."
/>
</Link>
</Col>
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/application/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function Application() {
<Skeleton />
) : (
<Link key="1" to="/applications/type">
<Button type="primary">New Application</Button>
<Button type="primary">Manage Application</Button>
</Link>
)
) : null}
Expand Down

0 comments on commit d1ef1b7

Please sign in to comment.