kennethreitz/records

Failure to acquire `DATABASE_URL` when set after import

fritz-clicktripz opened this issue · 0 comments

Records extracts DATABASE_URL from the environment at the module level, at import time.

If the environment changes in between the import, and the instantiation, this change is not reflected.

Proposal to move https://github.com/kennethreitz/records/blob/master/records.py#L13, into the initialization step, conditionally if the value is null at initialization time.