TAXIIProject / django-taxii-services

Installable taxii_services
http://taxiiproject.github.io/
BSD 3-Clause "New" or "Revised" License
20 stars 13 forks source link

Attempt to submit subscription request to collection management service results in Query column cannot be null error. #27

Closed SyntaxGeek closed 9 years ago

SyntaxGeek commented 9 years ago

When submitting a subscription ACTIVE request to collection management service I'm getting a Query column cannot be null error. Looking in the table it would appear the column is set to not allow nulls and setting it to allow nulls allows the subscription request to go through.

Going through libtaxii documentation shows that Query is an optional param:

class libtaxii.messages_11.SubscriptionParameters(response_type='FULL', content_bindings=None, query=None)

TAXII Subscription Parameters.
Parameters: 

    response_type (str) – The requested response type. Must be either RT_FULL or RT_COUNT_ONLY. Optional, defaults to RT_FULL
    content_bindings (list of ContentBinding objects) – A list of Content Bindings acceptable in response. Optional
    query (Query) – The query for this poll parameters. Optional

I can cause the error again by switching back the db column to not null if need be and provide more information/debugging.

Using latest master and django 1.7.1

MarkDavidson commented 9 years ago

@SyntaxGeek, thanks for reporting this.

My response assumes you mean a Subscription Management Request with an action of Subscribe. (This may be picking nits, but Active is a state that the subscription can have, valid actions are SUBSCRIBE, UNSUBSCRIBE, PAUSE, RESUME, and STATUS).

You are correct that Query is optional and that this the current master. What's funny is I had some uncommited changes that do just this. I'll push up those changes (which may or may not result in all issues going away) and you can let me know how they work for you.

Thnak you. -Mark

SyntaxGeek commented 9 years ago

Thanks for the changes, I'm checking them out to see if they solve the issue.

MarkDavidson commented 9 years ago

No problem. Let me know if you find anything. -Mark