Skip to content

Commit

Permalink
Fx project details (#493)
Browse files Browse the repository at this point in the history
* chore: add cluster information to the project

* Hot-fix: Non admin user project fetch
  • Loading branch information
khalifan-kfan committed Apr 12, 2024
1 parent 62a6544 commit a3e0453
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,12 @@ def get(self, project_id):
# return cluster information
cluster_schema = ClusterSchema()
project_cluster = project.cluster
print(project_cluster)
cluster_data, errors = cluster_schema.dumps(project_cluster)

# if user not an admin
if not is_admin(current_user_roles):
return dict(status='success', data=dict(
project=json.loads(**json.loads(project_data), cluster=json.loads(cluster_data),))), 200
project=dict(**json.loads(project_data)), cluster=json.loads(cluster_data))), 200
else:
apps_schema = AppSchema(many=True)
database_schema = ProjectDatabaseSchema(many=True)
Expand All @@ -376,7 +376,7 @@ def get(self, project_id):
apps=json.loads(apps_data),
databases=json.loads(databases_data),
users=json.loads(users_data),
cluster=json.loads(cluster_data),
cluster=json.loads(cluster_data)
))), 200

@jwt_required
Expand Down

0 comments on commit a3e0453

Please sign in to comment.