diff --git a/README.rst b/README.rst index 793095b..ef11365 100644 --- a/README.rst +++ b/README.rst @@ -82,7 +82,7 @@ Create a ticket : att_path = r'C:\Temp\image001.png' mimetype = mimetypes.guess_type(att_path)[0] att_file = open(att_path , 'rb') - att_content = base64.b64encode(af1.read()) + att_content = base64.b64encode(att_file.read()) att1 = Attachment(Content=att_content, ContentType=mimetype, Filename="image001.png") att_file.close() @@ -95,7 +95,7 @@ Update an article : # changes the title of the ticket t_upd = Ticket(Title='Updated ticket') - client.tc.TicketUpdate(t_id, t_upd) + client.tc.TicketUpdate(t_id, ticket=t_upd) # appends a new article (attachments optional) new_article = Article(Subject='More info', Body='blabla', Charset='UTF8', @@ -160,7 +160,7 @@ List FAQ Categories that have Public FAQ items in them: for category in catlist: print category.ID, category.Name -Retrieve a pubblic FAQ article by ID +Retrieve a public FAQ article by ID (note: FAQ Item ID is not the same as the item number!) :: diff --git a/otrs/ticket/operations.py b/otrs/ticket/operations.py index 0d3b1fa..53561a8 100644 --- a/otrs/ticket/operations.py +++ b/otrs/ticket/operations.py @@ -108,8 +108,8 @@ def __call__(self, dynamic_fields=None, **kwargs): df_search = DynamicField(GreaterThanEquals=df.Value) elif df.Operator == 'SmallerThan': df_search = DynamicField(SmallerThan=df.Value) - elif df.Operator == 'SmallerThan': - df_search = DynamicField(SmallerThan=df.Value) + elif df.Operator == 'SmallerThanEquals': + df_search = DynamicField(SmallerThanEquals=df.Value) else: raise WrongOperatorException() df_search.XML_NAME = 'DynamicField_{0}'.format(df.Name)