diff --git a/api/tacticalrmm/software/admin.py b/api/tacticalrmm/software/admin.py index 8bece102..c61cfb01 100644 --- a/api/tacticalrmm/software/admin.py +++ b/api/tacticalrmm/software/admin.py @@ -1,16 +1,11 @@ from django.contrib import admin -from .models import ChocoLog, ChocoSoftware, InstalledSoftware +from .models import ChocoSoftware, InstalledSoftware class ChocoAdmin(admin.ModelAdmin): readonly_fields = ("added",) -class ChocoLogAdmin(admin.ModelAdmin): - readonly_fields = ("time",) - - admin.site.register(ChocoSoftware, ChocoAdmin) -admin.site.register(ChocoLog, ChocoLogAdmin) admin.site.register(InstalledSoftware) diff --git a/api/tacticalrmm/software/migrations/0003_delete_chocolog.py b/api/tacticalrmm/software/migrations/0003_delete_chocolog.py new file mode 100644 index 00000000..8d2aecb8 --- /dev/null +++ b/api/tacticalrmm/software/migrations/0003_delete_chocolog.py @@ -0,0 +1,16 @@ +# Generated by Django 3.1.7 on 2021-03-01 21:43 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('software', '0002_auto_20200810_0544'), + ] + + operations = [ + migrations.DeleteModel( + name='ChocoLog', + ), + ] diff --git a/api/tacticalrmm/software/models.py b/api/tacticalrmm/software/models.py index 6c3e8258..ec7f546a 100644 --- a/api/tacticalrmm/software/models.py +++ b/api/tacticalrmm/software/models.py @@ -11,18 +11,6 @@ class ChocoSoftware(models.Model): return f"{len(self.chocos)} - {self.added}" -class ChocoLog(models.Model): - agent = models.ForeignKey(Agent, related_name="chocolog", on_delete=models.CASCADE) - name = models.CharField(max_length=255) - version = models.CharField(max_length=255) - message = models.TextField() - installed = models.BooleanField(default=False) - time = models.DateTimeField(auto_now_add=True) - - def __str__(self): - return f"{self.agent.hostname} | {self.name} | {self.time}" - - class InstalledSoftware(models.Model): agent = models.ForeignKey(Agent, on_delete=models.CASCADE) software = models.JSONField()