Fix script for graphing entities

PR #1220 simplified the implementation of the `OneToOneField` and
`OneToManyField` classes. Both classes now record which kind of entity they
point to in the instance variable "entity". Formerly, only the `OneToManyField`
did this, and the `OneToOneField` used a variable named "model".

Fix `scripts/graph_entities.py` to deal with this change.
Merge pull request #1226 from Ichimonji10/graph-entities

Fix script for graphing entities