Skip to content

Commit 1aad406

Browse files
committed
fix migration
1 parent e385f12 commit 1aad406

File tree

3 files changed

+25
-6
lines changed

3 files changed

+25
-6
lines changed

.env_template

+3
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ COMPOSE_FILE=docker/default.yml:docker/local.override.yml
1111

1212
# local development with elasticsearch container
1313
#COMPOSE_FILE=docker/default.yml:docker/local.override.yml:docker/elasticsearch.yml
14+
15+
# If you want to run a specific version, populate this
16+
# REACT_APP_INTELOWL_VERSION="1.5.0"

docker/version.override.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# you have to populate the ENV variable REACT_APP_INTELOWL_VERSION in the .env file to have this work
2+
services:
3+
uwsgi:
4+
image: intelowlproject/greedybear:${REACT_APP_INTELOWL_VERSION}
5+
6+
nginx:
7+
image: intelowlproject/greedybear_nginx:${REACT_APP_INTELOWL_VERSION}
8+
9+
celery_beat:
10+
image: intelowlproject/greedybear:${REACT_APP_INTELOWL_VERSION}
11+
12+
celery_worker_default:
13+
image: intelowlproject/greedybear:${REACT_APP_INTELOWL_VERSION}

greedybear/migrations/0014_auto_20250210_1258.py

+9-6
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@
55

66
def removeDdospot(apps, schema_editor):
77
GeneralHoneypot = apps.get_model("greedybear", "GeneralHoneypot")
8-
ddospot = GeneralHoneypot.objects.get(name__iexact="Ddospot")
9-
IOC = apps.get_model("greedybear", "IOC")
10-
# do nothing if Ddospot is in active use
11-
if ddospot.active and IOC.objects.filter(general_honeypot=ddospot).exists():
12-
return
13-
ddospot.delete()
8+
try:
9+
ddospot = GeneralHoneypot.objects.get(name__iexact="Ddospot")
10+
IOC = apps.get_model("greedybear", "IOC")
11+
# do nothing if Ddospot is in active use
12+
if ddospot.active and IOC.objects.filter(general_honeypot=ddospot).exists():
13+
return
14+
ddospot.delete()
15+
except GeneralHoneypot.DoesNotExist as e:
16+
pass
1417

1518

1619
class Migration(migrations.Migration):

0 commit comments

Comments
 (0)