Эх сурвалжийг харах

doesnt show art thats already listed in the market

control 3 жил өмнө
parent
commit
f5bc26a3d9
1 өөрчлөгдсөн 5 нэмэгдсэн , 4 устгасан
  1. 5 4
      app/dashboards.py

+ 5 - 4
app/dashboards.py

@@ -81,9 +81,10 @@ def create():
     available_art = list()
 
     # 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
     if form.validate_on_submit():
@@ -112,4 +113,4 @@ def search():
 @dashboards.route('/detail')
 @login_required
 def detail():
-    return render_template('detail_art.html', user=current_user)
+    return render_template('detail_art.html', user=current_user)