Issue #2 resolved

Error in comparison query

Anonymous created an issue

I have AsnNetblocks table with following fields :

  • id (bigint)
  • start_ipaddress_id (IPyfield)
  • end_ipaddredd_id (IPyfield)
  • asn_id (int)

In my program, I am trying to get asn_id of a given ipaddress by doing: ipaddr = IP(ipaddress_from_user) asn_netblock = AsnNetblock.object.filter(start_ipaddress_idlte = ipaddr, end_ipaddress_idgte = ipaddr )

However lte/gte operations are giving me TypeErrors...

Comments (3)

  1. Owen Nelson repo owner

    Hi there Anonymous,

    When I originally wrote this, I had been allowing only range and exact queries. Many months on, I can't figure out what the justification was to exclude gt/lt queries from happening, so I guess the reason couldn't have been that good.

    Hopefully I'll be able to setup some test cases, reproduce, and implement a fix here before the weekend is through.

  2. Log in to comment