Permalink
Browse files

fixed NPE if "latest" is used

  • Loading branch information...
1 parent abaae7c commit e6d7f39178c86882470b57a296518b6e4eb39be0 Schakko committed Feb 22, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/groovy/de/ckl/dbmigration/Migrator.groovy
@@ -126,7 +126,7 @@ class Migrator {
println "[merging] Searching directory '" + pathdef.dir.getName() + "'"
// if latest file should be used, the latest migration inside the database is not relevant
- def use_version = pathdef.latest_only ? (new Version()) : version
+ def use_version = (pathdef.latest_only || version == null) ? (new Version()) : version
def candidates = strategy.find_unapplied_migrations_since(use_version, pathdef.dir, guard)

0 comments on commit e6d7f39

Please sign in to comment.