Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
|
|
|
|
| 2 |
import os
|
| 3 |
import io
|
| 4 |
import base64
|
|
@@ -3626,7 +3627,7 @@ def inventory_action(env_id):
|
|
| 3626 |
|
| 3627 |
@app.route('/<env_id>/inventory_history/<p_id>/<t_id>')
|
| 3628 |
def inventory_history(env_id, p_id, t_id):
|
| 3629 |
-
data = get_env_data(env_id)
|
| 3630 |
history = data.get('inventory_history',[])
|
| 3631 |
item_history =[h for h in history if h.get('product_id') == p_id and h.get('tag_id') == t_id]
|
| 3632 |
item_history.sort(key=lambda x: x['timestamp'], reverse=True)
|
|
|
|
| 1 |
|
| 2 |
+
|
| 3 |
import os
|
| 4 |
import io
|
| 5 |
import base64
|
|
|
|
| 3627 |
|
| 3628 |
@app.route('/<env_id>/inventory_history/<p_id>/<t_id>')
|
| 3629 |
def inventory_history(env_id, p_id, t_id):
|
| 3630 |
+
data = get_env_data(env_id)
|
| 3631 |
history = data.get('inventory_history',[])
|
| 3632 |
item_history =[h for h in history if h.get('product_id') == p_id and h.get('tag_id') == t_id]
|
| 3633 |
item_history.sort(key=lambda x: x['timestamp'], reverse=True)
|