Skip to content

Commit 2a341b5

Browse files
Merge pull request #3193 from antgonza/min-fix-for-plugin-testing
minimal fix for plugin testing
2 parents fbe1f01 + 51f5351 commit 2a341b5

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

qiita_db/handlers/plugin.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,16 @@ class ReloadPluginAPItestHandler(OauthBaseHandler):
250250
def post(self):
251251
"""Reloads the plugins"""
252252
conf_files = sorted(glob(join(qiita_config.plugin_dir, "*.conf")))
253-
for fp in conf_files:
254-
software = qdb.software.Software.from_file(fp, update=True)
255-
software.activate()
256-
257-
software.register_commands()
253+
software = set([qdb.software.Software.from_file(fp, update=True)
254+
for fp in conf_files])
255+
definition = set(
256+
[s for s in software if s.type == 'artifact definition'])
257+
transformation = software - definition
258+
for s in definition:
259+
s.activate()
260+
s.register_commands()
261+
for s in transformation:
262+
s.activate()
263+
s.register_commands()
258264

259265
self.finish()

0 commit comments

Comments
 (0)