diff --git a/Dockerfile b/Dockerfile index e6e65b3..b3a3f61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,6 @@ RUN uv pip install --system -e . # Copy application code COPY *.py ./ COPY blueprints ./blueprints -COPY aerich.toml ./ COPY migrations ./migrations COPY startup.sh ./ RUN chmod +x startup.sh diff --git a/main.py b/main.py index a63a85e..16d0313 100644 --- a/main.py +++ b/main.py @@ -210,7 +210,10 @@ if __name__ == "__main__": c.execute("DELETE FROM indexed_documents") conn.commit() - simba_docs.delete(ids=[]) + # Delete all documents from the collection + all_docs = simba_docs.get() + if all_docs["ids"]: + simba_docs.delete(ids=all_docs["ids"]) logging.info("Fetching documents from Paperless-NGX") ppngx = PaperlessNGXService()