Fix: The lock was not working because:

1. The Account Types sent were sqlqueries and not integer literals
2. Voucher Types and Account Types were being compared to VoucherTypesSelected and AccountTypesSelected objects and not their ids.
This commit is contained in:
2021-09-10 21:46:47 +05:30
parent dbf0ecf0d8
commit ca352649f0
10 changed files with 127 additions and 65 deletions

View File

@ -7,9 +7,8 @@ RUN npm install --unsafe-perm && /app/overlord/node_modules/.bin/ng build
FROM python:latest
LABEL maintainer="Amritanshu <docker@tanshu.com>"
COPY --from=builder /app/brewman /app
COPY --from=builder /app/frontend /app/frontend
WORKDIR /app
ADD https://git.tanshu.com/tanshu/brewman/raw/tag/latest/brewman/pyproject.toml /app/pyproject.toml
# Install Poetry
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | POETRY_HOME=/opt/poetry python && \
@ -17,10 +16,15 @@ RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/inst
ln -s /opt/poetry/bin/poetry && \
poetry config virtualenvs.create false
WORKDIR /app
# Allow installing dev dependencies to run tests
ARG INSTALL_DEV=false
RUN bash -c "if [ $INSTALL_DEV == 'true' ] ; then poetry install --no-root ; else poetry install --no-root --no-dev ; fi"
COPY --from=builder /app/brewman /app
COPY --from=builder /app/frontend /app/frontend
ENV PYTHONPATH=/app
EXPOSE 80
VOLUME /frontend
@ -30,4 +34,4 @@ RUN chmod 777 /app/docker-entrypoint.sh \
&& ln -s /app/docker-entrypoint.sh /
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["python", "-m", "brewman"]
CMD ["poetry", "run", "python", "-m", "brewman"]