Skip to content

Commit

Permalink
Merge pull request #1183 from OpenEnergyPlatform/release/v0.12.2
Browse files Browse the repository at this point in the history
Release/v0.12.2
  • Loading branch information
jh-RLI authored Mar 23, 2023
2 parents 7c95a87 + da84531 commit a45c8ee
Show file tree
Hide file tree
Showing 11 changed files with 598 additions and 6 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.12.1
0.12.12
6 changes: 6 additions & 0 deletions api/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,12 @@ def _get_table(schema, table):
return Table(table, metadata, autoload=True, autoload_with=engine, schema=schema)


def get_table_metadata(schema, table):
table_obj = _get_table(schema=schema, table=table)
comment = table_obj.comment
return json.loads(comment) if comment else {}


def __internal_select(query, context):
# engine = _get_engine()
context2 = dict(user=context.get("user"))
Expand Down
5 changes: 2 additions & 3 deletions api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,8 @@ def __create_sequence(self, request, schema, sequence, jsn):
class Metadata(APIView):
@api_exception
def get(self, request, schema, table):
table_obj = actions._get_table(schema=schema, table=table)
comment = table_obj.comment
return JsonResponse(json.loads(comment) if comment else {})
metadata = actions.get_table_metadata(schema, table)
return JsonResponse(metadata)

@api_exception
@require_write_permission
Expand Down
5 changes: 4 additions & 1 deletion base/templates/base/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ <h2> Ontology </h2>
<div class= "panel-description">
<h2> Academy </h2>
<p class="alternative">
There is something you'd like to do on the platform, but you don't know how? Check out the tutorials! They are available for all levels, and in the form of texts, videos and markdowns.
The Open Energy Academy (OEA) provides courses as well as dedicated tutorials
covering important topics around the Open Energy Family (OEF) tools
and the Open Energy Platform (OEP).
You will also find short answers to urgent questions.
</p>
</div>
</div>
Expand Down
Loading

0 comments on commit a45c8ee

Please sign in to comment.