diff --git a/states.py b/states.py index 1b5b05c..dfda2b7 100644 --- a/states.py +++ b/states.py @@ -59,7 +59,6 @@ class States(PA): self.last_eid=0 self.num_entries=0 - print("BUG-DEBUG: States() called view_eid reset to None") # this is any next/prev or noo, grouping, etc. change (so use referrer to work out what to do with this) # because this can happen on a view, or files_up, etc. change this FIRST if 'change_file_opts' in request.path: @@ -71,13 +70,11 @@ class States(PA): if 'view_list' in request.path: self.path_type = 'View' self.view_eid = request.form['view_eid'] - print(f"BUG-DEBUG: States() called view_eid set as 'view_list' in request.path - {self.view_eid}") self.url = request.form['orig_url'] # this occurs ONLY when a POST to /view/ occurs (at this stage orig_url will be from an import, storage, bin or search) elif 'view' in request.path: self.path_type = 'View' self.view_eid = self.url[6:] - print(f"BUG-DEBUG: States() called view_eid set as 'view' in request.path - {self.view_eid}") # use orig url to define defaults/look up states for 'last' import/storage/bin/search if request.method == "POST": self.url = request.form['orig_url'] @@ -129,7 +126,6 @@ class States(PA): # use url to get eid of viewed entry self.view_eid = self.url[6:] - print(f"BUG-DEBUG: States() called 'view' in self.url view_eid={self.view_eid}") # force this to be a search so rest of code won't totally die, but also not return anything self.path_type="Search" self.orig_url=self.url @@ -168,7 +164,6 @@ class States(PA): self.orig_search_term=pref.orig_search_term self.orig_url = pref.orig_url self.view_eid = pref.view_eid - print(f"BUG-DEBUG: view_eid based on prefs- {self.view_eid}") self.current = pref.current if self.path_type == "View": self.root='static/' + self.orig_ptype @@ -269,8 +264,7 @@ class States(PA): self.offset += int(self.how_many) else: # should be impossible now, but leave jic - SetFELog( message=f"WARNING: next image requested, but would go past end of list? - ignore this" , level="warning", persistent=True, cant_close=True ) - SetFELog( message=f"DDP - offset={self.offset} + how_many={self.how_many} > num_entries={self.num_entries}" , level="danger", persistent=True, cant_close=True ) + SetFELog( message=f"WARNING: next image requested, but would go past end of list? - ignore this" , level="warning", persistent=True, cant_close=False ) if 'current' in request.form: self.current = int(request.form['current']) @@ -282,13 +276,11 @@ class States(PA): noo=self.noo, grouping=self.grouping, how_many=self.how_many, st_offset=self.offset, size=self.size, folders=self.folders, root=self.root, cwd=self.cwd, orig_ptype=self.orig_ptype, orig_search_term=self.orig_search_term, orig_url=self.orig_url, current=self.current, first_eid=self.first_eid, last_eid=self.last_eid, num_entries=self.num_entries ) - print( f"BUG-DEBUG: prefs SET based on self, view_eid={self.view_eid}") else: # update this pref with the values calculated above (most likely from POST to form) pref.pa_user_dn=current_user.dn pref.path_type=self.path_type pref.view_eid=self.view_eid - print( f"BUG-DEBUG: prefs UPDATED based on self, view_eid={self.view_eid}") pref.noo=self.noo pref.grouping=self.grouping pref.how_many=self.how_many