Changes between Initial Version and Version 1 of Ticket #30391


Ignore:
Timestamp:
Apr 22, 2019, 4:02:25 PM (6 years ago)
Author:
DavionKalhen
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30391 – Description

    initial v1  
    77comment = Comments.objects.using('specialcmts').get(pk=23)
    88#if pk=23 exists in 'default' db, comment will be that value, or it throws an error.
     9comment = Comments.objects.using('specialcmts').filter(pk=23)[0]
     10#Same behaviour as above.
     11
     12#I'm working around this with:
     13comment = None
     14comments = Comments.objects.using('specialcmts').filter(pk=23)
     15for c in comments:
     16    comment = c
    917}}}
Back to Top