Navigation Menu

Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
Fix history retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Dec 30, 2014
1 parent ee4c2ac commit 24f48b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions synoptic/__init__.py
Expand Up @@ -746,7 +746,7 @@ def http_export_items(self, request):
def http_get_item_history(self, request):
item_id = int(request.GET["item_id"])

json = [
json_data = [
{
"version_id": iv.id,
"timestamp": iv.timestamp,
Expand All @@ -756,9 +756,9 @@ def http_get_item_history(self, request):
for iv in request.dbsession.query(ItemVersion)
.filter_by(item_id=item_id)
.order_by(ItemVersion.timestamp.desc())]
json[0]["is_current"] = True
json_data[0]["is_current"] = True

return request.respond(json.dumps(json),
return request.respond(json.dumps(json_data),
mimetype="text/plain")

def http_store_item(self, request):
Expand Down

0 comments on commit 24f48b7

Please sign in to comment.