Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError for the citext field #10

Open
farhatnawaz opened this issue Sep 27, 2017 · 4 comments
Open

KeyError for the citext field #10

farhatnawaz opened this issue Sep 27, 2017 · 4 comments

Comments

@farhatnawaz
Copy link

I wanted a citext field in my API, so I decided to use this package. But it raises an error saying that there is a keyError for the citext field. The code is like so:

class Book(Model):
    __tablename__ = 'books'
    id = db.Column(db.String(32), primary_key=True)
    book_code = db.Column(CIText())

    def __init__(self, bookcode):
        self.id = str(uuid.uuid4().hex)
        self.book_code = bookcode

Any idea what's wrong?

@omalbhagya
Copy link

@hm43
Copy link
Contributor

hm43 commented Jun 13, 2018

Same here !

@hm43
Copy link
Contributor

hm43 commented Jun 15, 2018

@farhatnawaz @omalbhagya :
solution : from citext import CIText

@mahmoudimus you need to add that in the readme .

@mahmoudimus
Copy link
Owner

@hm43 would you make a PR? I am happy to add it this weekend if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants