Opened 8 years ago

Closed 8 years ago

#27282 closed Bug (fixed)

port cant be integer with oracle backend

Reported by: Zapelini Owned by: nobody
Component: Database layer (models, ORM) Version: 1.10
Severity: Normal Keywords: port
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

if you set the PORT to be an integer with the oracle backend you will get an exception because it calls strip on the value:

https://github.com/django/django/blob/master/django/db/backends/oracle/base.py#L194

note that the other backends do not do this, so either an integer or string value will do just fine.

https://github.com/django/django/blob/master/django/db/backends/postgresql/base.py#L165

The fix ix simple: just remove the .strip() call from line 194

Change History (3)

comment:1 by Zapelini, 8 years ago

There is a pull request at: https://github.com/django/django/pull/7302

comment:2 by Tim Graham, 8 years ago

Has patch: set
Triage Stage: UnreviewedReady for checkin

The strip() is from the original backend but I don't see much need for it either.

comment:3 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In 62543260:

Fixed #27282 -- Allowed using an integer DATABASESPORT for Oracle.

Note: See TracTickets for help on using tickets.
Back to Top