Explorar el Código

doesnt show art thats already listed in the market

control hace 3 años
padre
commit
f5bc26a3d9
Se han modificado 1 ficheros con 5 adiciones y 4 borrados
  1. 5 4
      app/dashboards.py

+ 5 - 4
app/dashboards.py

@@ -81,9 +81,10 @@ def create():
     available_art = list()
     available_art = list()
 
 
     # to remove art that is already listed
     # to remove art that is already listed
-    available_art = [art for art in owned_art if art.filehash not in listed_art]
-    print(listed_art)
-    print(available_art)
+    for oa in owned_art:
+        for la in listed_art:
+            if oa.filehash != la.filehash:
+                available_art.append(oa)
 
 
    # check POST req
    # check POST req
     if form.validate_on_submit():
     if form.validate_on_submit():
@@ -112,4 +113,4 @@ def search():
 @dashboards.route('/detail')
 @dashboards.route('/detail')
 @login_required
 @login_required
 def detail():
 def detail():
-    return render_template('detail_art.html', user=current_user)
+    return render_template('detail_art.html', user=current_user)