fix issue with no scan
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -7,6 +7,6 @@ COPY --chown=reflex --from=gitea.pb42.de/matthias/reflex-ipad:builder /app /app
|
||||
COPY --chown=reflex deploy/* .
|
||||
RUN chown reflex:reflex /app
|
||||
USER reflex
|
||||
ENV PATH="/app/.venv/bin:$PATH" API_URL=$API_URL
|
||||
ENV PATH="/app/.venv/bin:$PATH" API_URL=$API_URL PYTHONUNBUFFERED=TRUE
|
||||
|
||||
CMD reflex db migrate && reflex run --env dev --backend-only
|
||||
|
||||
@@ -36,6 +36,8 @@ class NewMedicineState(rx.State):
|
||||
statement = select(Scan).order_by(Scan.timestamp.desc()).limit(1)
|
||||
results = session.exec(statement)
|
||||
self.last_scan = results.first()
|
||||
if self.last_scan is None:
|
||||
return
|
||||
if self.last_scan.timestamp > self.lastupdatetime:
|
||||
self.last_scan_uuid = self.last_scan.uuid
|
||||
if not self.show_med_add_form:
|
||||
|
||||
Reference in New Issue
Block a user