@receiver(pre_save, sender=DatabaseInfra)
def databaseinfra_pre_save(sender, **kwargs):
    databaseinfra = kwargs.get('instance')
    LOG.debug("databaseinfra pre-save triggered")
    if not databaseinfra.plan:
        databaseinfra.plan = databaseinfra.engine.engine_type.default_plan
        LOG.warning("No plan specified, using default plan (%s) for engine %s" % (
            databaseinfra, databaseinfra.engine))
databaseinfra pre save
dataset/ETHPy150Open globocom/database-as-a-service/dbaas/physical/models.py/databaseinfra_pre_save