default for similar folder by date is now +/- 2 weeks not 1 AND fix use of SetFELog with log_level="error" => level="danger"
This commit is contained in:
6
files.py
6
files.py
@@ -589,7 +589,7 @@ def view_list():
|
|||||||
# this occurs when we went from the last image on a page (with how_many on
|
# this occurs when we went from the last image on a page (with how_many on
|
||||||
# it) and it just happened to also be the last in the DB...
|
# it) and it just happened to also be the last in the DB...
|
||||||
if not entries:
|
if not entries:
|
||||||
SetFELog( message="DDP: DONT think this can happen anymore", log_level="error", job=None, persistent=True, cant_close=True )
|
SetFELog( message="DDP: DONT think this can happen anymore", level="danger", job=None, persistent=True, cant_close=True )
|
||||||
|
|
||||||
# undo the skip by how_many and getentries again
|
# undo the skip by how_many and getentries again
|
||||||
OPT.offset -= int(OPT.how_many)
|
OPT.offset -= int(OPT.how_many)
|
||||||
@@ -677,7 +677,7 @@ def view(id):
|
|||||||
eids=eids.rstrip(",")
|
eids=eids.rstrip(",")
|
||||||
# jic, sometimes we trip this, and rather than show broken pages / destroy
|
# jic, sometimes we trip this, and rather than show broken pages / destroy
|
||||||
if id not in eids:
|
if id not in eids:
|
||||||
SetFELog( message=f"ERROR: viewing an id, but its not in eids OPT={OPT}, id={id}, eids={eids}", log_level="error", persistent=True, cant_close=True)
|
SetFELog( message=f"ERROR: viewing an id, but its not in eids OPT={OPT}, id={id}, eids={eids}", level="danger", persistent=True, cant_close=True)
|
||||||
msg="Sorry, viewing data is confused, cannot view this image now"
|
msg="Sorry, viewing data is confused, cannot view this image now"
|
||||||
if os.environ['ENV'] == "production":
|
if os.environ['ENV'] == "production":
|
||||||
msg += "Clearing out all states. This means browser back buttons will not work, please start a new tab and try again"
|
msg += "Clearing out all states. This means browser back buttons will not work, please start a new tab and try again"
|
||||||
@@ -785,7 +785,7 @@ def _jinja2_filter_parentpath(path):
|
|||||||
def get_existing_paths(dt):
|
def get_existing_paths(dt):
|
||||||
dir_ft=FileType.query.filter(FileType.name=='Directory').first()
|
dir_ft=FileType.query.filter(FileType.name=='Directory').first()
|
||||||
dirs_arr=[]
|
dirs_arr=[]
|
||||||
for delta in range(-7, 8):
|
for delta in range(-14, 15):
|
||||||
try:
|
try:
|
||||||
new_dtime=datetime.strptime(dt, "%Y%m%d") + timedelta(days=delta)
|
new_dtime=datetime.strptime(dt, "%Y%m%d") + timedelta(days=delta)
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in New Issue
Block a user