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

scrubbers.Hash failing on TextFields #9

Closed
meshy opened this issue Sep 7, 2018 · 3 comments · Fixed by #10
Closed

scrubbers.Hash failing on TextFields #9

meshy opened this issue Sep 7, 2018 · 3 comments · Fixed by #10

Comments

@meshy
Copy link
Contributor

meshy commented Sep 7, 2018

  • Django Scrubber version: 0.3.0
  • Django version: any
  • Python version: any
  • Operating System: linux

Description

Things go wrong when max_length is defined on a field as None.

This is the default for TextFields in django. I think it occurs on this line:

if 'max_length' in self.extra:

What I Did

django.db.utils.ProgrammingError: column "none" does not exist
LINE 1: ...), "address" = SUBSTR(MD5("client"."address"), 1, None), "va...

We may be able to look into this next week.

@meshy
Copy link
Contributor Author

meshy commented Sep 10, 2018

I'll be looking into this this morning.

@costela
Copy link
Collaborator

costela commented Sep 10, 2018

Good catch! This use-case totally slipped my mind.
Should be a 1-liner + 1 test case. Or am I missing some other underlying subtlety?

@meshy
Copy link
Contributor Author

meshy commented Sep 10, 2018

You're right -- should be a basic one :)

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

Successfully merging a pull request may close this issue.

2 participants