Created
January 22, 2015 23:52
-
-
Save penguinbroker/6b88ed887f6dd168298f to your computer and use it in GitHub Desktop.
clear bad phone numbers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val users = Await.result(ComponentRegistry.institutionUserDao.tableScan, 100.seconds) | |
users map { u => | |
u.phoneNumber map { phoneNum => | |
if (phoneNum.number.contains("region")) { | |
println("--") | |
println("fixing user") | |
println(u) | |
Await.result(ComponentRegistry.institutionUserService.update(u.copy(phoneNumber = None)), 5.seconds) | |
Thread.sleep(100) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment