Commit 0651c15f authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Fix migration script

parent 11b91150
......@@ -22,7 +22,6 @@ class Command(BaseCommand):
"Do you want to delete all existing objects? (type yes or no) ")
if input_val == 'yes':
MerchandiseItem.objects.all().delete()
return
session = requests.Session()
url = "https://thalia.nu/index.php/association/merchandise"
......@@ -35,6 +34,8 @@ class Command(BaseCommand):
price = Decimal(item.find("div", {"id": "merchandise-price"})
.text[9:].replace(',', '.'))
print("Importing {}".format(title))
merch = MerchandiseItem()
merch.name_nl = title
merch.name_en = title
......
Supports Markdown
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