Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Commit

Permalink
Ignore missing consumer profile during applicability regeneration
Browse files Browse the repository at this point in the history
closes #3745
https://pulp.plan.io/issues/3745

(cherry picked from commit e46c622)
  • Loading branch information
goosemania authored and pcreech committed Jun 18, 2018
1 parent e098dc9 commit 60513d7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion server/pulp/server/managers/consumer/applicability.py
Expand Up @@ -248,7 +248,14 @@ def regenerate_applicability(profile_hash, content_type, profile_id,
else:
unit_profile = UnitProfile.get_collection().find_one({'id': profile_id},
projection=['profile'])
profile = unit_profile['profile']
try:
profile = unit_profile['profile']
except TypeError:
# It means that unit_profile = None.
# Consumer can be removed during applicability regeneration,
# so it is possible that its profile no longer exists. It is harmless.
return

call_config = PluginCallConfiguration(plugin_config=profiler_cfg,
repo_plugin_config=None)
try:
Expand Down

0 comments on commit 60513d7

Please sign in to comment.