Skip to content

Commit

Permalink
feat: Change to an assertion, as there is a programming error if this…
Browse files Browse the repository at this point in the history
… is the case (e.g. expected_files_count is set incorrectly)
  • Loading branch information
jpmckinney committed Apr 16, 2024
1 parent c341bea commit d1514bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion process/management/commands/compiler.py
Expand Up @@ -84,7 +84,8 @@ def compilable(collection):
# 2. Check whether compilation *can* occur.

# Note: expected_files_count is None if the close_collection endpoint hasn't been called (e.g. using load command).
if collection.expected_files_count == 0 and collection.collectionfile_set.count() == 0:
if collection.expected_files_count == 0:
assert collection.collectionfile_set.count() == 0
return True

# This can occur if the close_collection endpoint is called before the file_worker worker can process any messages.
Expand Down

0 comments on commit d1514bf

Please sign in to comment.