Commit ad70649c authored by Christos Stavrakakis's avatar Christos Stavrakakis

cyclades: Fix bug in flavor-modify command

Fix bug in flavor-modify command, which resulted in flavors being always
deleted. Deleted option must be parsed to bool, otherwise is always
True.
parent 5c7fc690
......@@ -35,6 +35,7 @@ from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
from synnefo.management.common import get_flavor
from synnefo.webproject.management.utils import parse_bool
from logging import getLogger
......@@ -63,6 +64,7 @@ class Command(BaseCommand):
deleted = options['deleted']
if deleted:
deleted = parse_bool(deleted)
log.info("Marking flavor %s as deleted=%s", flavor, deleted)
flavor.deleted = deleted
flavor.save()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment