0

I have the following models setup:

class Cluster(models.Model):
    name = models.CharField(...)
    ...


class ResourceRequest(Process):
    cluster = models.ForeignKey('Cluster')

    def clean(self, ...):
        if self.cluster.name == 'abc':
            ...

And when I try to post to:

http://pmas-local:8000/workflow/api/tasks/vm_request/resourcerequest/start/

it complains that ResourceRequest has no cluster.

Stacktrace shows if self.cluster.name == 'abc': caused the problem.

James Lin
  • 25,028
  • 36
  • 133
  • 233

1 Answers1

0

The error is not related to django-viewflow. That's standard django error for a foreign key field, which means that self.cluster is None.

kmmbvnr
  • 5,863
  • 4
  • 35
  • 44